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.



Are the L-functions of a normalized newform and the corresponding cuspidal representation equal?
$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](http://www.math.unt.edu/%7Eschmidt/papers/gl2.pdf) and [Kondo-Yasuda](https://www.sciencedirect.com/science/article/pii/S0022314X1200090X).


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}.$$


