# “Extra Euler factors” in one definition of the L-function of a twist of a modular form

Let $(\rho_{f,\lambda})_\lambda$ be the system of Deligne's $\ell$-adic representations attached to a modular newform $f$ (where $\lambda$ runs over the finite places of the number field $K$ generated by the Fourier coefficients of $f$), and take a character $\chi\colon\mathrm G_{\mathbb Q}\rightarrow\overline{\mathbb Q}^\times$ of finite order (assume for simplicity it takes values in $K$). Fix embeddings of $\overline{\mathbb Q}$ into each $\overline{\mathbb Q}_\ell$. Then we can look at the system of $\lambda$-adic realizations $(\rho_{f,\lambda}\otimes\chi)_\lambda$.

Let me call a system $(\rho_\lambda)_\lambda$ of $\ell$-adic representations compatible if for each prime $p$ the polynomial $$P_p(T)=\begin{cases}\det(1-\mathrm{Frob_p}T,\rho_\lambda^{I_p}), & \lambda\not\mid p,\\ \det(1-\varphi T,\mathrm D_{\mathrm{cris}}(\rho_\lambda)), & \lambda\mid p\end{cases}$$ does not depend on the choice of a place $\lambda$ and has coefficients in $\overline{\mathbb Q}$.

It is known that the system $(\rho_{f,\lambda})_\lambda$ is compatible in this sense (using results of Scholl and Saito), and it seems to be well-known that this holds also for the system $(\rho_{f,\lambda}\otimes\chi)_\lambda$. Probably this can be seen somehow using Weil-Deligne representations, but I haven't yet worked out the details (any hints or references on this are welcome!).

But my actual question is the following. If we define the $L$-function of such a compatible system as usual as the Euler product $$L((\rho_\lambda)_\lambda,s)=\!\!\!\prod_{p\text{ any prime}}\!\!\! P_p(p^{-s}),$$ then the $L$-function associated to $(\rho_{f,\lambda})_\lambda$ is just the $L$-function of $f$. But what is the $L$-function of $(\rho_{f,\lambda}\otimes\chi)_\lambda$? If we view $\chi$ as a Dirichlet character of $(\mathbb{Z}/N)^\times$ for the minimal possible $N$ via class field theory, then one often considers the $L$-function defined by $$L(f,\chi,s)=\sum_{n=1}^\infty \chi(n)a_nn^{-s},$$ where the $a_n$ are the Fourier coefficients. But in general the $L$-function of the system $(\rho_{f,\lambda}\otimes\chi)_\lambda$ differs from this one. Indeed, D. Loeffler's answer to my question How large is Dcris of certain twists of modular forms? shows that we get at least an extra Euler factor at $p$ if $f$ is $p$-ordinary and the $p$-part of $\chi$ cancels the $p$-part of the nebentype of $f$. Can we in general tell which additional Euler factors (compared to $L(f,\chi,s)$) this $L$-function has?

Let me translate this into a problem purely about automorphic forms:

Take a newform $f \in \mathcal{S}_k^{\ast}(q,\chi)$, and a primitive Dirichlet character $\psi$ modulo $q'$. Then there exists a newform $f \otimes \psi$ of weight $k$, level dividing $q {q'}^2$, and nebentypus induced by the primitive character inducing $\chi \psi^2$, such that whenever $(n,q') = 1$, the $n$-th Hecke eigenvalue $\lambda_{f \otimes \psi}(n)$ of $f \otimes \psi$ is $\lambda_f(n) \psi(n)$.

Since $f \otimes \psi$ is a newform, it has an $L$-function $L(s,f \otimes \psi) = \prod_p L_p(s,f \otimes \psi),$ where for $p \nmid (q,q')$, $L_p(s,f \otimes \psi) = \frac{1}{1 - \lambda_f(p) \psi(p) p^{-s} + \chi(p) \psi^2(p) p^{-2s}},$ while for $p \mid (q,q')$, this may be something more complicated.

On the other hand, we may define the "naïve" $L$-function associated to $f \otimes \psi$ as the analytic continuation of the Dirichlet series $\sum_{n = 1}^{\infty} \frac{\lambda_f(n) \psi(n)}{n^s} = \prod_p \frac{1}{1 - \lambda_f(p) \psi(p) p^{-s} + \chi(p) \psi^2(p) p^{-2s}},$ where the Euler product identity holds by multiplicativity.

So I believe the question you are asking is when $L_p(s,f \otimes \psi)$ is not equal to $(1 - \lambda_f(p) \psi(p) p^{-s} + \chi(p) \psi^2(p) p^{-2s})^{-1}$ (or equivalently when $\lambda_{f \otimes \psi}(p)$ is not equal to $\lambda_f(p) \psi(p)$). This can only occur when $p \mid (q,q')$, in which case $(1 - \lambda_f(p) \psi(p) p^{-s} + \chi(p) \psi^2(p) p^{-2s})^{-1} = 1$, and the answer depends sensitively on the local component $\pi_{f,p}$ of $f$ (which is a ramified representation of $\mathrm{GL}_2(\mathbb{Q}_p)$) as well as the local components $\chi_p,\psi_p$ of $\chi,\psi$ (which are characters of $\mathbb{Q}_p^{\times}$, the latter of which is ramified). This can be dealt with via a case-by-case approach.

• If $\pi_{f,p}$ is supercuspidal, then $L_p(s,f \otimes \psi) = 1.$ This is also true if $\pi_{f,p} = \omega_p \mathrm{St}_p$ is a special representation (so that the central character of $\pi_{f,p}$ is $\chi_p = \omega_p^2$) with $\omega_p$ and $\omega_p \psi_p$ both ramified, or if $\omega_p$ is unramified. Note that $\pi_{f,p} \otimes \psi_p = \omega_p \psi_p \mathrm{St}_p$ for special representations.

• If $\pi_{f,p} = \omega_p \mathrm{St}_p$ is a special representation with $\omega_p$ ramified but $\omega_p \psi_p$ unramified (so that $\omega_p \psi_p(p) \in \{\pm 1\}$), then $L_p(s,f \otimes \psi) = \frac{1}{1 - \omega_p \psi_p(p) p^{-s-1/2}} \neq 1.$

• Finally, if $\pi_{f,p} = \omega_{1,p} \boxplus \omega_{2,p}$ is a ramified principal series representation (so that the central character of $\pi_{f,p}$ is $\chi_p = \omega_{1,p} \omega_{2,p}$), then $\pi_{f,p} \otimes \psi_p = \omega_{1,p} \psi_p \boxplus \omega_{2,p} \psi_p$, and $L_p(s,f \otimes \psi) = \frac{1}{(1 - \omega_{1,p} \psi_p(p) p^{-s})(1 - \omega_{2,p} \psi_p(p) p^{-s})}.$ If $\omega_{1,p} \psi_p$ and $\omega_{2,p} \psi_p$ are both ramified, then $\omega_{1,p} \psi_p(p) = \omega_{2,p} \psi_p(p) = 0$, and so $L_p(s,f \otimes \psi) = 1$. However, if either one is unramified, then one of $\omega_{1,p} \psi_p(p), \omega_{2,p} \psi_p(p)$ is nonzero, and so $L_p(s,f \otimes \psi) \neq 1$.

If $f(z)=\sum_{n \geq 1} a_n q^n$ is a newform of level $\Gamma_1(N)$ and $\chi$ is a Dirichlet character modulo $m$, then the naïve twist of $f$ by $\chi$ is the modular form $f_\chi(z) = \sum_{n \geq 1} a_n \chi(n) q^n$. As was already pointed out $f_\chi$ is not always a newform, but there is a unique newform $f \otimes \chi$ sharing the same Hecke eigenvalues at primes $p$ not dividing $m$. If $N$ and $m$ are coprime then $f_\chi = f \otimes \chi$ is a newform, but this is not always the case in general. A criterion for $f_\chi$ being a newform (equivalently $f_\chi = f \otimes \chi$) has been worked out by Atkin--Li in their article Twists of newforms and pseudo-eigenvalues of $W$-operators (see Corollary 3.1).

The question of determining the Euler factor of $f \otimes \chi$ at $p$ is clearly a local one, so we may assume that $\chi$ is a primitive Dirichlet character of conductor $p^\alpha$ with $\alpha \geq 1$, and that $p$ divides $N$. In general the Euler factor of $f \otimes \chi$ at $p$ can be determined from the local automorphic representation associated to $f$, as explained by Peter Humphries. There is however a special case which is easy, namely when $f$ is $p$-primitive, meaning that $f$ has minimal level among its twists by characters of $p$-power conductor. If $f$ is $p$-primitive and $a_p \neq 0$ then we have the formula $$L_p(f \otimes \chi,s)^{-1} = 1- \bar{a}_p \cdot (\psi \chi)_0(p) p^{-s}$$ where $\psi$ is the Nebentypus character of $f$, and $(\psi \chi)_0$ is the primitive Dirichlet character associated to $\psi \chi$. This is explained in Merel's article Symboles de Manin et valeurs de fonctions $L$ (Section 2.6).

The L-series of $\rho_{f, \lambda} \otimes \chi$ is the $L$-series of $f \otimes \chi$, where $f \otimes \chi$ is the unique newform such that $a_\ell(f \otimes \chi) = \chi(\ell) a_\ell(f)$ for all but finitely many $\ell$. So your Galois-theoretic question reduces to a purely automorphic one, namely determining the Hecke eigenvalues of $f \otimes \chi$ at the bad primes (the ones dividing the conductor of $\chi$).

In general, this is a bit fiddly to do algorithmically, if your starting point is just the $q$-expansion of $f$; but of course if you know the local factors of the automorphic representation associated to $\chi$ then you can read off the corresponding data for $f \otimes \chi$ immediately.