TITLE: Are the L-functions of a normalized newform and the corresponding cuspidal representation equal?
QUESTION [9 upvotes]: Let $f \in S_k(\Gamma_0(N))$ be a normalized newform with Fourier expansion
$$f(z) = \sum\limits_{n=1}^{\infty} a_n e^{2\pi i z n}$$
and $a_1 = 1$.  Then $f$ is an eigenfunction of all Hecke operators $T_p$, not just those with $(p,N) = 1$, and for the normalized L-function
$$L^{S_{\infty}}(f,s) = \sum\limits_{n=1}^{\infty} \frac{n^{(1-k)/2}a_n}{n^s}$$
one can add in an archimedean factor to make a completed L-function $L(f,s)$ which is an Euler product
$$L(f,s) = \prod\limits_{p \leq \infty} L_p(f,s)$$
and, for a suitable "contragredient" $g \in S_k(\Gamma_0(N))$ and epsilon root number $\epsilon(f,s)$, satisfies the functional equation
$$L(f,s) = \epsilon(f,s) L(g,1-s).$$
See for example Kowalski's article "Classical Automorphic Forms" in the book "An Introduction to the Langlands Program." 
Now, $f$ can be identified in various ways with a cuspidal automorphic form on $\operatorname{GL}_2(\mathbb Q) \backslash \operatorname{GL}_2(\mathbb A_{\mathbb Q})$.  There is a cuspidal automorphic representation $\pi = \otimes \pi_p$, unique up to isomorphism, which contains $f$.  The normalized newform $f$ is conversely uniquely determined by $\pi$.  This is one way to state the "Multiplicity One" theorem.  
Also, $\pi$ itself has an L-function $L(\pi,s) = \prod\limits_{p \leq \infty} L(\pi_p,s)$ satisfying its own functional equation $L(\pi,s) = \epsilon(\pi,s) L(\tilde{\pi},1-s)$.
At the primes $p$ not dividing $N$, the representation $\pi_p$ is spherical, and the L-function $L(\pi_p,s)$ arises from the local spherical Hecke algebra of $\operatorname{GL}_2(\mathbb Q_p)$.  Here things can be normalized so that
$$L(\pi_p,s) = L_p(f,s). \tag{1} $$
What about the primes dividing $N$?  Here $L_p(f,s)$ arises from a Hecke operator $T_p$, but the representation $\pi_p$ could be supercuspidal, or it could have an Iwahori-fixed vector but be non-spherical.  With the proper normalizations, can we have equation (1) holding for all primes $p$ (and consequently $L(\pi,s) = L(f,s)$)?  Note that when $\pi_p$ is supercuspidal or is induced from a ramified character, $L(\pi_p,s) = 1$.
I expect it's possible to normalize things so that the local factors of $L(f,s)$ and $L(\pi,s)$ agree at all places, but I have never seen any reference which does this.

REPLY [10 votes]: $L(\pi,s)$ agrees with $L(f,s)$ if $f\in\pi$ is a newform, and this is even true for $\mathrm{GL}_n$. Of course, things are complicated by the fact that there are many ways to define $L(\pi,s)$ and $L(f,s)$. I found the following papers very useful to check various consistencies: Schmidt and Kondo-Yasuda.
Here is a summary based on Kondo-Yasuda. Let $G:=\mathrm{GL}_n$. Let $(\pi,V_\pi)$ be a cuspidal automorphic representation of $G$ over $\mathbb{Q}$ of unitary central character $\omega$. Let $K_p(c)$ denote the subgroup of elements of $G(\mathbb{Z}_p)$ whose bottom row is congruent to $\begin{pmatrix}0 & \cdots & 0 & 1\end{pmatrix}$ modulo $c$. Let $K(c):=\prod_p K_p(c)$. The conductor $c_\pi$ is the smallest $c$ such that $V_\pi^{K(c)}\neq\{0\}$. An element of $V_\pi^{K(c_\pi)}$ is called a global newform: it is an eigenfunction of the convolution by any element of $C_c(K_p(c_\pi)\backslash G(\mathbb{Q}_p)/K_p(c_\pi))$. Let $c_\omega$ be the conductor of $\omega$, and consider the corresponding primitive Dirichlet character modulo $c_\omega$:
$$\chi_\omega(m):=\omega(1,\underbrace{1,\dotsc,1}_{v\mid c_\omega},\underbrace{m,m,\dotsc}_{v\nmid c_\omega})=
\omega(1,\underbrace{m^{-1},\dotsc,m^{-1}}_{v\mid c_\omega},\underbrace{1,1,\dotsc}_{v\nmid c_\omega}),$$
for $m>0$ and $(m,c_\omega)=1$. Note that $c_\omega\mid c_\pi$. Let $\chi_\pi$ denote the Dirichlet character modulo $c_\pi$ induced by $\chi_\omega$. 
For $k\in\{1,\dotsc,n-1\}$, we define the $k$-th Hecke operator at $p$ as the characteristic function of
$$H_k(p):=K_p(c_\pi)\,\mathrm{diag}(\underbrace{p,\dotsc,p}_\text{$k$ entries},\underbrace{1,\dotsc, 1}_\text{$n-k$ entries})\,K_p(c_\pi).$$
Accordingly, let $\lambda_{\pi,k}(p)$ be the $k$-th normalized Hecke eigenvalue at $p$:
$$\int_{H_k(p)}f(xg)\,dg=\lambda_{\pi,k}(p)p^{\frac{k(n-k)}{2}}\mathrm{vol}(K_p)f(x),\qquad f\in V_\pi^{K(c_\pi)}.$$
Further, let $\lambda_{\pi,0}(p):=1$ and $\lambda_{\pi,n}(p):=\chi_\pi(p)$.
Theorem (Tamagawa 1963, Satake 1963, Kondo-Yasuda 2010).
$$L(\pi,s)=\prod_p\left(\sum_{k=0}^n(-1)^k\lambda_{\pi,k}(p)p^{-ks}\right)^{-1}.$$