Function: ramanujantau
Section: number_theoretical
C-Name: ramanujantau
Prototype: GD12,L,
Help: ramanujantau(n,{ell=12}): compute the value of Ramanujan's tau function
 at n, assuming the GRH. If ell is 16, 18, 20, 22, or 26, same for the
 newform of level 1 and corresponding weight. Otherwise, compute the
 coefficient of the trace form at n. Algorithm in O(n^{1/2+eps}).
Doc: compute the value of Ramanujan's tau function at an individual $n$,
 assuming the truth of the GRH (to compute quickly class numbers of imaginary
 quadratic fields using \tet{quadclassunit}). If \kbd{ell} is 16, 18, 20, 22,
 or 26, same for the newform of level 1 and corresponding weight. Otherwise,
 compute the coefficient of the trace form at $n$.
 The complexity is in $\tilde{O}(n^{1/2})$ using $O(\log n)$ space.

 If all values up to $N$ are required, then
 $$\sum \tau(n)q^{n} = q \prod_{n\geq 1} (1-q^{n})^{24}$$
 and more generally, setting $u = \ell - 13$ and $C = 2/\zeta(-u)$ for $\ell
 > 12$,
 $$\sum\tau_{\ell}(n)q^{n} = q \prod_{n\geq 1}
  (1-q^{n})^{24} \Big( 1 + C\sum_{n\ge1}n^{u} q^{n} / (1-q^{n})\Big)$$
 produces them in time $\tilde{O}(N)$, against $\tilde{O}(N^{3/2})$ for
 individual calls to \kbd{ramanujantau}; of course the space complexity then
 becomes $\tilde{O}(N)$. For other values of $\ell$,
 \kbd{mfcoefs(mftraceform([1,ell]),N)} is much faster.
 \bprog
 ? tauvec(N) = Vec(q*eta(q + O(q^N))^24);
 ? N = 10^4; v = tauvec(N);
 time = 26 ms.
 ? ramanujantau(N)
 %3 = -482606811957501440000
 ? w = vector(N, n, ramanujantau(n)); \\ much slower !
 time = 13,190 ms.
 ? v == w
 %4 = 1
 @eprog

Function: _ramanujantau_worker
C-Name: ramanujantau_worker
Prototype: GGGG
Section: programming/internals
Help: worker for ramanujantau

Function: _taugen_n_worker
C-Name: taugen_n_worker
Prototype: GGG
Section: programming/internals
Help: worker for ramanujantau
