Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This question is closed as off-topic and duplicate of How plot the Riemann zeta zero spectrum with the Fourier transform in Mathematica?

In the paper "The Riemann Hypothesis" by J. Brian Conrey in figure 6 there is a plot of the Fourier transform of the error term in the prime number theorem. See the plot to the left in the image below:

Plots from Conrey's paper on the Riemann hypothesis <

In a blog post called Primes out of Thin Air written by Chris King there is a Matlab program that plots the spectrum. See the plot to the right at the beginning of the post. A translation into Mathematica is possible:

Mathematica:

scale = 10^6;
 start = 1;
 fin = 50;
 its = 490;
 xres = 600;
 y = N[Accumulate[Table[MangoldtLambda[i], {i, 1, scale}]], 10];
 x = scale;
 a = 1;
 myspan = 800;
 xres = 4000;
 xx = N[Range[a, myspan, (myspan - a)/(xres - 1)]];
 stpval = 10^4;
 F = Range[1, xres]*0;

For[t = 1, t <= xres, t++,
 For[yy = 0, yy <= Log[x], 1/stpval++,
 F[[t]] =
 F[[t]] +
 Sin[t*myspan/xres*yy]*(y[[Floor[Exp[yy]]]] - Exp[yy])/Exp[yy/2];
 ]
 ]
 F = F/Log[x];
 ListLinePlot[F]

However, this is as I understand it the matrix formulation of the Fourier sine transform and it is therefore very costly to compute. I do NOT recommend running it because it already crashed my computer once.

Is there a way in Mathematica utilising the Fast Fourier Transform, to plot the spectrum with spikes at x-values equal to imaginary part of Riemann zeta zeros?

I have tried the commands "FourierDST" and "Fourier" without success. The problem seems to be that the variable "yy" in the code is included in both "Sin[t*myspan/xres*yy]" and "(y[[Floor[Exp[yy]]]] - Exp[yy])/Exp[yy/2]".

share|improve this question

closed as off topic by Willie Wong Jan 20 '12 at 13:37

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
This question might better fit to stackoverflow (it is in its heart numerical and not mathematical). –  Fabian Jan 19 '12 at 21:52
    
Ok, thank you for the comment. Is there a way to migrate the question or should I rewrite it at stackoverflow? –  Mats Granvik Jan 19 '12 at 21:56
    
As far as I understand, there is no way to migrate the question. –  Fabian Jan 19 '12 at 21:59
    
Can't moderators migrate it? –  E.O. Jan 19 '12 at 22:05
1  
SO? This question was made for the new Computational Science site which just went beta. –  Unreasonable Sin Jan 19 '12 at 22:12