Long list of values of Ramanujan Tau function

582 Views Asked by At

In order to study Ramanujan tau function I need a long list of values. After some search in the internet I did not find a source that has a comprehensive list, i.e. more then 250 entries.

I would be very thankful if someone knows such a source.

3

There are 3 best solutions below

0
On

Using $$\sum_{n\geq 1}\tau(n)q^n=q\prod_{n\geq 1}(1-q^n)^{24}$$ it is easy to generate $\tau(n),n\in 1 \ldots N$

% Matlab code O(N^2) operations
N = 10^6;
tau = zeros(1,N);
tau(1) = 1;
for n= 1:N
  for k = 1:24
    tau(n+1:N) = tau(n+1:N) - tau(1:N-n);
  end
end

Otherwise we can compute the coefficients of $\zeta(s)\zeta(s+3)$ and $\zeta(s)\zeta(s+5)$ ie. of $E_4,E_6$ in $\mathcal{O}(N \log N)$ operations and use the FFT convolution and $1728 \Delta = E_4^3 - E_6^2$ to compute $\tau(n),n\in 1 \ldots N$ in $\mathcal{O}(N \log N)$, very close to the optimal algorithm.


To compute an isolated value of $\tau(m)$, we might use the multiplicativity and $\tau(p^{k+2}) - \tau(p) \tau(p^k) + p\,\tau(p^k) = 0$, but say if $m$ is prime this will be useless and we'll need to compute $\tau(n)$ for $n \le m$.

7
On

Mathematica gives 10,000 values in 7.5 seconds on a Mac desktop:

Table[RamanujanTau[n], {n, 10000}]

where the first twenty entries are:

$$\{1, -24, 252, -1472, 4830, -6048, -16744, 84480, -113643,$$

$$-115920, 534612, -370944, -577738, 401856, 1217160,$$

$$987136, -6905934, 2727432, 10661420, -7109760\}$$

If you have multicores (e.g., eight), you can get $100,000$ values in $16.9$ seconds by:

Parallelize[Table[RamanujanTau[n], {n, 100000}]]

This speed is faster than $10$ times the speed on a single core, proving (given parallelization partitioning and communication overhead) that there is some true benefit to parallelization.

As far as I can tell, Mathematica does not compute the RamanujanTau function iteratively. As evidence: Mathematica computes the single $100000$th RamanujanTau value in 0.000168 seconds... (much less than a millisecond) perhaps NOT an iterative algorithm.

I know of no way to speed up the computation for $n =$ prime, but parallelization allows you to compute those values in parallel, e.g., for some primes on core 1, other primes on core 2, and so on.
If $n =$ prime, there is no help in iterative schemes. Here the benefit of Parallellize in Mathematica is quite evident. If we compute the RamaujanTau for the first 2000 primes, it takes $6.55$ seconds on a single core and just $0.213$ seconds on an eight-core machine. Clearly this is done by the first 2000/8 primes on core 1, the second 2000/8 on core 2, and so forth.

Regardless, the details of Mathematica's internal algorithm need not concern us--and they certainly do not concern the question poser. All that is necessary for obtaining very large sets of values through parallelization is that the function calls can be run in parallel, as described above. So to the question "parallelizing what?", the answer is clearly: "parallelizing the calls to the non-iterative algorithm for computing RamanujanTau."

Any concern for Mathematica's internal algorithm is completely misplaced and irrelevant to the explicit question as posed. The OP explicitly seeks a list of values, and expresses no interest whatsoever in the algorithm, nor even the speed at which the algorithm runs. I don't know the internal details of Mathematica's algorithm, and don't care, and for this problem neither should anybody. Everyone on this page (save one poster) understands this simple point, as is clear from their answers which link to the OEIS or LMFDB or methods for computing, such as WolframAlpha, as was positively acknowledged and accepted in a comment by the OP.

0
On

This function appears on the LMFDB, which is the L-function and Modular Form Database. On the linked page at the bottom, you should see a possibility of downloading the first 999999 coefficients.

It happens to be that you could also compute these in sage online for free (look up CoCalc for a free notebook), or use something like pari (free, a bit hard to use) or maple/mathematica/magma (expensive, relatively easy to use) to compute these quickly without actually programming anything.