This question has its seed in this one by Gory, which found an enlightening answer but one of the comments kept me wondering. I am beginning to discover Hecke operators, and there appears to be an ubiquitous relation between Hecke eigenvalues and coefficients of L-functions that I do not get at all. I will try to state everything in details.

**Hecke operators.** Let us fix a place $p$ and consider an unramified local component $\pi_p$ of an automorphic representation of $GL_2$ over $F$. Let $K_p$ denote $GL_2(\mathcal{O}_p)$. We define the Hecke operator $T_{p^i}$ as the convolution action of the characteristic function of
$$\bigcup_{\substack{a+b = i \\ a \geqslant b}}
K_p
\left(
\begin{array}{cc}
p^a & \\
& p^b
\end{array}
\right)
K_p$$

**L-functions.** The automorphic representation $\pi$ also has an attached $L$-function (built on the Satake parameters at unramified places and a specific completion defining the remaining factors) which can be written as (and this defines the $\lambda_\pi(n)$)
$$L(s, \pi) = \sum_{n \geqslant 1} \lambda_\pi(n) n^{-s}$$

**Coefficients as eigenvalues.** With all those definitions in hand, if $\phi$ is a function in the (one-dimensional) subspace of $K_p$-invariant vectors of $\pi_p$, do we have that
$$T_{p^i} \star \phi = p^{1/2} \lambda_\pi(p^i) \phi \quad ?$$

**Questions.** More precisely, I would like to ask both following (maybe elementary) questions:

- I know it for $i=1$ (for instance Gelbart), however does it remain for $i \geqslant 2$, and do you have a proof of that?
- in the case where $\pi_p$ is ramified, those convolutions always give zero because there is no $K_p$ invariant vector in $\pi_p$ but the convolution creates such invariant vectors. In order to get the coefficient $\lambda_\pi(p^i)$ is this case, can I do exactly the same construction replacing $K_p$ by $K_1(p^f)$ where $f$ is the (additive) arithmetic conductor of $\pi_p$? (in that case the vector space of vectors fixed by it is one-dimensional)

I would appreciate any details or good reference for this matters, thanks in advance!