modular form Fourier coefficients and associated automorphic representation Hi,
Let $f$ be a cuspidal modular form of some weight and level $N$. Then it determines
an irreducible automorphic representation $\pi = \bigotimes'\pi_p$ of $GL_2(\mathbf Q)$.
Let $f = \sum_i a_i q^i$ be its fourier expansion. Then it is known that if $p\nmid N$,
then $a_p$ determines $\pi_p$ (it is an unramified principal series). Is it true that
$a_p$ determines $\pi_p$ in general? And if so, how?
Thanks!
 A: No. 
A supercuspidal representation, a Steinberg twisted by a ramified character and a principal series ramified at both characters at $p$ will all have zero $a_{p}$. A reference for this is Jacquet-Langlands LN 114 Proposition 3.5, 3.6. I am also not sure one can distinguish a priori a simply ramified principal series and a Steinberg twisted by an unramified character purely using $a_{p}$, you might need to look at the order of the central character at $p$ to do this (in the latter case, the central character is trivial at $p$ while it is not in the former). 
A: Jared Weinstein and I wrote a paper on how to compute $\pi_p$: see here. 
As Olivier says, $a_p$ will often be zero, and in fact if the central character is trivial (or has conductor coprime to $p$) this is always the case when $p^2$ divides the level of $f$. One can get a bit futher by twisting: you can always twist a newform by Dirichlet characters, and Atkin and Li have shown that $\pi_p$ is principal series or Steinberg at $p$ if and only if there is some Dirichlet character $\chi$ such that the twist of $f$ by $\chi$ is a newform with nonzero Fourier coefficient at $p$ (or an oldform attached to such a newform).
So that leaves the supercuspidal cases, and here Hecke theory won't help you at all: no matter how you twist your form, the Hecke eigenvalues are all zero. One can actually show (the "local converse theorem") that $\pi_p$ is uniquely determined by the Atkin-Lehner pseudo-eigenvalues of all of the twists of $f$; but it is not so easy to calculate these, or to explicitly identify $\pi_p$ from a list of them once you've done so. In my paper with Jared you can find details of a different approach, using Bushnell and Kutzko's theory of "types", which seems to work quite well.
These algorithms are implemented in recent versions of Magma (and should be in Sage fairly shortly as well, once someone gets around to reviewing my code). 
