TITLE: Open project: Let's compute the Fourier expansion of a non-solvable algebraic Maass form.
QUESTION [66 upvotes]: OK so let's see if I can use MO to explicitly compute an example of something, by getting other people to join in. Sort of "one level up"---often people answer questions here but I'm going to see if I can make people do a more substantial project. Before I start, note
(1) the computation might have been done already [I'd love to hear of a reference, if it has]
(2) the computation may or may not be worth publishing
(3) If it is worth publishing, there may or may not be a debate as to who the authors are.
I personally don't give a hang about (2) or (3) at this point, but others might. Let me get on to the mathematics. Oh---just a couple more things before I start---this project is related to the mathematics at this question, but perhaps pushes it a bit further (if we can get it to work). I had initially thought about these issues because I was going to give them to an undergraduate, but the undergraduate tells me today that he's decided to do his project on the holomorphic case, and it seemed a bit daft to let my initial investment in the problem go to waste, so I thought I'd tell anyone who was interested. If no-one takes the bait here, I'll probably just make this another UG project.
OK so here's the deal. Say $K/\mathbf{Q}$ is a finite Galois extension, and $\rho:Gal(K/\mathbf{Q})\to GL(2,\mathbf{C})$ is an irreducible 2-dimensional representation. General conjectures in the Langlands philosophy predict that $\rho$ comes from an automorphic form on $GL(2)$ over $\mathbf{Q}$. The idea is that we are going to "see" this form in an explicit example where general theory does not yet prove that it exists.
Now the determinant of $\rho$ is a 1-dimensional Galois representation, and it makes sense to ask whether $det(\rho(c))$ is $+1$ or $-1$, where $c$ is complex conjugation. It has to be one of these, because $c^2=1$. The nature of the automorphic form predicted to exist depends on the sign. 
If the determinant is $-1$ then the form should be holomorphic, and a classical weight 1 cusp form. In this case the existence of the form is known, because it is implied by Serre's conjecture, which is now a theorem of Khare and Wintenberger.
If the determinant is $+1$ then the conjectural form should be a real-analytic function on the upper half plane, invariant under a congruence subgroup, and satisfying a certain differential equation (which is not the Cauchy-Riemann equations in this case). If the image of $\rho$ is a solvable group then the existence of this form is known by old work of Langlands and Tunnell. 
So in summary then, the one case where the form is not known to exist is when the determinant of complex conjugation is $+1$ and the image of Galois is not solvable.
Here is an explicit example. The polynomial
g5=344 + 3106*x - 1795*x^2 - 780*x^3 - x^4 + x^5

has splitting field $L$, an $A_5$-extension of $\mathbf{Q}$ ramified only at the prime 1951. Now $A_5$ is isomorphic to the quotient of $SL(2,\mathbf{F}_5)$ by its centre $\pm 1$, and $L$ has a degree two extension $K_0$, also unramified outside 1951, with $Gal(K_0/\mathbf{Q})$ being $SL(2,\mathbf{F}_5)$. Turns out that $K_0$ can be taken to be the splitting field of the rather messier polynomial
g24 = 14488688572801 - 2922378139308818*x^2 + 134981448876235615*x^4 -   1381768039105642956*x^6 + 4291028045077743465*x^8 -   2050038614413776542*x^10 + 287094814384960835*x^12 - 9040633522810414*x^14 + 63787035668165*x^16 - 158664037068*x^18 +   152929135*x^20 - 50726*x^22 + x^24

I should perhaps say that David Roberts told me these polynomials in Jan 2008; they're in a paper by him and John Jones---but they learnt about them from a paper of Doud and Moore. 
Now $SL(2,\mathbf{F}_5)$ has two faithful 2-dimensional complex representations; the traces of each representation take values in $\mathbf{Q}(\sqrt{5})$ and one is of course the conjugate of the other. The determinant of both representations is trivial so in fact they are $SL(2,\mathbf{C})$-valued. Oh---also, all the roots of g24 are real---and hence $K_0$ is totally real. So what we have here is a representation
$$\rho_0:Gal(K_0/\mathbf{Q})\to GL(2,\mathbf{C})$$
which is conjectured to come from automorphic forms, but, as far as I know, the conjecture is not known in this case.
Unfortunately the conductor of $\rho_0$ is $1951^2$, which is a bit big. In fact let me say something more about what is going on at 1951. In the $A_5$ extension the decomposition and inertia groups at 1951 are both cyclic of order 5. If my understanding of what David Roberts told me is correct, in the $SL(2,\mathbf{F}_5)$ extension the decomposition and inertia groups are both cyclic of order 10 (in fact I just got magma to check this). But the upshot is that $\rho_0$ restricted to a decomposition group at 1951 is of the form $\psi+\psi^{-1}$ with $\psi$ of order 10. Which character of order 10? Well there are four characters $(\mathbf{Z}/1951\mathbf{Z})^\times\to\mathbf{C}^\times$ of order 10, and two of them will do, and two won't, and which ones will do depends on which 2-dimensional representation of $SL(2,\mathbf{F}_5)$ you chose.
The key point though is that if you get $\psi$ right, then the twist $\rho:=\rho_0\otimes\psi$ will have conductor 1951, which is tiny for these purposes.
Now, as Marty did in an $A_4$ example and as I did and Junkie did in a dihedral example
in the Maass form question cited above, it is possible to figure out explicitly numbers $b_1$, $b_2$, $b_3$,..., with the property that 
$$L(\rho,s)=\sum_{n\geq1}b_n/n^s.$$
If one had a computer program that could calculate $b_n$ for $n\geq1$, then there are not one but two ways that one could attempt to give computational evidence for the predictions given by the Langlands philosophy:
(A) one could use techniques that Fernando Rodriguez-Villegas explained to me a few months ago to try and get computational evidence that $L(\rho,s)$ had analytic continuation to the complex plane and satisfied the correct functional equation, and
(B) one could compute the corresponding real analytic function on the upper half plane, evaluate it at various places to 30 decimal places, and see if the function was invariant under the group $\Gamma_1(1951)$.
I don't know much about (A) but I once tried, and failed, to do (B), and my gut feeling is that my mistake is in the computer program I wrote to compute the $b_n$. But as junkie's response in the previous question indicates, there now seem to be several ways to compute the $b_n$ and one thing I am wondering is whether we can use the methods he/she indicated in this question.
Let me speak more about how I tried to compute the $b_n$. The character of the Maass form is $\psi^2$, the determinant of $\rho$. General theory tells us that $b_n$ is a multiplicative function of $n$ so we only need compute $b_n$ for $n$ a prime power. Again general theory (consider the local $L$-functions) says that for $p\not=1951$ one can compute $b_{p^n}$ from $b_p$. If $p=1951$ then $b_{p^n}=1$ for all $n$, because the decomposition and inertia groups coincide for 1951 in $K_0$ [EDIT: This part of the argument is wrong, and it explains why my programs didn't work. I finally discovered my mistake after comparing the output of mine and Junkie's programs and seeing where they differed. It's true that decomposition and inertia coincide in $K_0$ but when one twists by the order 10 character this stops being true. In fact $b_{1951}$ is a primitive 5th root of unity that I don't know how to work out using my method other than by trial and error.]. Finally, if the $L$-function of $\rho_0$ is $\sum_n a_n/n^s$ then $b_n=\psi(n)a_n$ for all $n$ prime to 1951, so it suffices to compute $a_p$ for $p\not=1951$.
To compute $a_p$ I am going to compute the trace of $\rho_0(Frob_p)$. I first compute the GCD of the degrees of the irreducible factors of g24 mod $p$. If $p$ doesn't divide the discriminant of g24 then this GCD is the order of $Frob_p$ in $SL(2,\mathbf{F}_5)$. If $p$ does divide the discriminant of g24 then rotten luck, I need to factorize $p$ in the ring of integers of the number field generated by a root of g24. I did this using magma. Here are the results:
                                                   prime   order
                                                     2       6
                                                     3      10
                                                     5       4
                                                   163       5
                                                 16061       1
                                                889289      10
                                          451400586583       2
                             1188493301983785760551727       2
120450513180827412314298160097013390669723824832697847       1

Now unfortunately just computing the order of the conj class of Frobenius is not enough to determine the trace of the Galois representation, because $SL(2,\mathbf{F}_5)$ contains two conj classes of elements of order 5, and two of order 10. However, in both cases, the conj classes remain distinct in $A_5$ and so it suffices to have an algorithm which can distinguish between the two conjugacy classes in $A_5$. More precisely, we have to solve the following problem: we label the conj classes of elements of order 5 in $A_5$ as C1 and C2, and we want an algorithm which, given a prime $p$ for which g5 is irreducible mod $p$, we want the algorithm to return "C1" or "C2" depending on which class $Frob_p$ is in. Here is a beautiful way of doing it, explained to me by Bjorn Poonen: if g5 is irreducible mod $p$ then its roots in an alg closure of $\mathbf{F}_p$ are $x,x^p,x^{p^2},...$. Set $x_i=x^{p^i}$ and compute $\prod_{i&lt;j}(x_i-x_j)$. This product is a square root of the discriminant of g5. Choose once and for all a square root of the discriminant of g5 in the integers; if the product is congruent to this mod $p$ return "C1", else return "C2".
That's it! I implemented this. I had a program which returned a bunch of $a_n$'s, and hence a bunch of $b_n$'s. I built the function on the upper half plane as the usual sum involving Bessel functions and so on, but it computationally did not come out to be invariant under $\Gamma_1(1951)$. 
If anyone wants to take up the challenge of computing the $b_n$ that would be great. I have explained one way to do it above, but I am well aware that there might be other ways to compute the $b_n$ analogous to junkie's approach from the previous question.

REPLY [8 votes]: I have accepted Junkie's answer to this question. But on analysing his working program and comparing it with my program-that-didn't-work I could easily find the bug in my program: I erroneously thought that the coefficient of $q^{1951}$ was 1 and it's not, it's a primitive 5th root of unity. My code works now, and is written in PARI-GP, so I thought I would post it so that people who don't have access to magma can play with the miracle that is a cuspidal Maass eigenform that (conjecturally) corresponds to a non-solvable even Galois representation. I make my post community wiki because my post says nothing that Junkie's doesn't so I don't want any credit for it.
\\ nonsolvmaass.g: works out a maass form associated to an explicit
\\ nonsolvable finite image even irred 2-d Galois rep.
\\ Note: rho(c)=-1 so we use sines.

\\ N is number of coefficients of the L-function we will compute.

N=2000000;

\\ g5 has splitting field an A_5 field.

g5=344 + 3106*x - 1795*x^2 - 780*x^3 - x^4 + x^5

\\ g24 has splitting field a field with Galois group SL(2,5).

g24 = 14488688572801 - 2922378139308818*x^2 + 134981448876235615*x^4 -   1381768039105642956*x^6 + 4291028045077743465*x^8 -   2050038614413776542*x^10 + 287094814384960835*x^12 -   9040633522810414*x^14 + 63787035668165*x^16 - 158664037068*x^18 +   152929135*x^20 - 50726*x^22 + x^24

\\ The character table of SL(2,5) starts like this:
\\
\\
\\ -------------------------------------------
\\ Class |   1  2  3  4    5    6  7    8    9
\\ Size  |   1  1 20 30   12   12 20   12   12
\\ Order |   1  2  3  4    5    5  6   10   10
\\ -------------------------------------------
\\ X.1   +   1  1  1  1    1    1  1    1    1
\\ X.2   -   2 -2 -1  0   Z1 Z1#2  1  -Z1-Z1#2
\\ X.3   -   2 -2 -1  0 Z1#2   Z1  1-Z1#2  -Z1
\\
\\...
\\
\\ # denotes algebraic conjugation, that is,
\\ #k indicates replacing the root of unity w by w^k
\\
\\ Z1     = (CyclotomicField(5)) ! [ RationalField() | 0, 0, 1, 1 ]
\\
\\ If we let K be the splitting field of g24 then K contains a splitting
\\ field for g5. If we fix an isomorphism of Gal(K/Q) with SL(2,5) and
\\ use X.2 to define a 2-dimensional representation of Gal(K/Q), then
\\ the resulting representation has conductor 1951^2. 
\\
\\ Here is a pari script to compute the order of Frob_p for the resulting
\\ representation (for p not 1951). First a function that only works for the primes
\\ not dividing disc(g24).

ordfrob0(p)=local(m);m=factormod(g24,p);lcm(vector(#m~,i,poldegree(m[i,1])))

\\ For the primes dividing disc(g24) other than 1951 I used magma to work
\\ out the answer by hand [computing a maximal order etc].

ordfrob(p)=if(p==1951,0,if(p==2,6,if(p==3,10,if(p==5,4,if(p==163,5,if(p==16061,1,if(p==889289,10,if(p==451400586583,2,if(p==1188493301983785760551727,2,if(p==120450513180827412314298160097013390669723824832697847,1,ordfrob0(p)))))))))))

\\ If the order of Frob_p in SL(2,5) is 5 or 10 then we have to decide which
\\ of the two conjugacy classes p is in! Classes 5 and 8 reduce to the same
\\ class in A_5, and classes 6 and 9 reduce to the other. So we have to
\\ be able to distinguish between the classes in A_5. Bjorn Poonen told
\\ me how to do this. The trick is to compute the product whose square
\\ is the discriminant mod p and to see which of the square roots of the
\\ discriminant that the product itself is isomorphic to.
\\ This will not work for any p dividing the discriminant of g5.
\\ Fortunately I checked explicitly that no prime p dividing disc(g5)
\\ has Frob_p of order 5 or 10. Hooray for good fortune!
\\ The function returns 0 or 1.

whichclass(p)=local(t,conjs,pro);t=Mod(x,Pol(Mod([1, -1, -780, -1795, 3106, 344],p)));conjs=[t];for(i=1,4,conjs=concat(conjs,conjs[i]^p));pro=1;for(i=1,5,for(j=i+1,5,pro=pro*(conjs[i]-conjs[j])));pro==518348075378;

\\ Now finally an algorithm to compute a_p.

zet10=exp(2*Pi*I/10);Z1=zet10^4+zet10^6;Z1h2=zet10^2+zet10^8;

ap(p)=if(p==1951,0,orp=ordfrob(p);if(orp==1,2,if(orp==2,-2,if(orp==3,-1,if(orp==4,0,if(orp==6,1,whp=whichclass(p);if(orp==5,if(whp==0,Z1,Z1h2),if(whp==0,-Z1,-Z1h2))))))))

\\ The problem with the Maass form associated to these eigenvalues is that, although it
\\ has trivial character, it has conductor 1951^2. At a prime above 1951, the
\\ inertia subgroup has order 10, as does the decomposition group. The representation
\\ sends a generator of this inertia subgroup to something with eigenvalues zet10
\\ and zet10^9. So we need to twist by a Dirichlet character of conductor 1951
\\ and order 10 and we will get a representation of conductor 1951.
\\ But which one?! Well, there are only four, and two will work, so we have
\\ a sporting chance! If we get it wrong we can just try another one.
\\ Note that 3 is a primitive root mod 1951.

twist=vector(1950,i,0);z0=zet10^3;z=z0;n=Mod(3,1951);for(i=1,1950,twist[lift(n)]=z;n=n*3;z=z*z0);

\\ The character of the form we are after is the square of "twist".

\\ Here's the trace of Frobenius on the conductor 1951 twist.
\\ Note that the value at p=1951 was found by trial and error.
\\ The error I made, that Junkie fixed, was that I thought that "pure thought" gave
\\ that bp(1951)=1.

bp(p)=if(p==1951,zet10^6,ap(p)*twist[p%1951])

\\ Here's the character of the form.

chi(p)=if(p==1951,0,twist[p%1951]^2);

\\ Now v will be the vector of Hecke eigenvalues.

v=vector(N,i,0);
v[1]=1;
for(i=2,N,if(i%1000==0,print(N-i));fac=factor(i);k=matsize(fac)[1];\
   if(k>1,v[i]=prod(j=1,k,v[fac[j,1]^fac[j,2]]),\
   if(fac[1,2]==1,v[i]=bp(i),\
   p=fac[1,1];e=fac[1,2];v[i]=v[p]*v[p^(e-1)]-chi(p)*v[p^(e-2)]))\
);

\\ Now glue them together with the Maass form analogue of a q-expansion.
\\ The function q^n is replaced by sqrt(y)*K(2.Pi.n.y)*sin(2.Pi.n.x)
\\ where K=K_0 is a certain Bessel function.

F(z)=local(x,y,M);x=real(z);y=imag(z);M=ceil(11/y);if(M>N,error("y too small."));sqrt(y)*sum(n=1,M,if(v[n]==0,0,v[n]*besselk(1e-30*I,2*Pi*n*y)*sin(2*Pi*n*x)))

If you cut and paste that into a pari session then it will either run out of memory, or spend a long time counting down from 2,000,000 to 0 and then stop. If it runs out of memory then type something like "allocatemem(2000000000)" or some such thing. If you can't be bothered to wait for the countdown to finish then change the "$N=$" line to something smaller at the beginning. It's computing the first $N$ coefficients of the Maass form. 
The form itself is the function $F$ defined on the last line. The larger you let $N$ be, the better precision $F$ will be defined to, and hence the nearer to the real line you'll be able to evaluate $F$. The point is that if $z$ is in the upper half plane but very close to the real line then you need a lot of terms of $F$ to evaluate $F(z)$ accurately.
As in Junkie's post, we may try a random verification, to see whether $F$ looks like it's invariant under $\Gamma_1(1951)$:
(22:47) gp > zz4=0.0001+0.0001*I
%7 = 0.0001000000000000000000000000000 + 0.0001000000000000000000000000000*I
(22:47) gp > F(zz4)
%8 = 0.000000008720947535106531893030584189 - 0.00000001730002410267070596763764527*I
(22:48) gp > F(zz4/(1951*zz4+1))
%9 = 0.000000008720947535106531893415409754 - 0.00000001730002410267070596828184932*I
(22:51) gp > %8-%9
%10 = -3.848255644 E-28 + 6.442040498 E-28*I

The point is that the difference between the two values of $F$ is a tiny number, so $F$ is, to within computational error, seemingly invariant under $\Gamma_1(1951)$. People can play with other examples, but be warned: the smaller $N$ is (i.e. the less time you could be bothered to wait at the beginning) the more careful one has to be (i.e. the more likely the program is to refuse to compute $F$ where you want it to compute it).