## Riemann zeta zero spectrum from stackoverflow

Fourier transform of PNT error term plot

Mathematica 8 code from Heike’s answer at stackoverflow:

```Clear[f] scale = 1000000; f = ConstantArray[0, scale]; f[[1]] = N@MangoldtLambda[1]; Monitor[Do[ f[[i]] = N@MangoldtLambda[i] + f[[i - 1]], {i, 2, scale}], i] xres = .002; xlist = Exp[Range[0, Log[scale], xres]]; tmax = 60; tres = .015; Monitor[errList = Table[(xlist^(-1/2 + I t).(f[[Floor[xlist]]] - xlist)), {t, Range[0, 60, tres]}];, t] ListLinePlot[Im[errList]/Length[xlist], DataRange -> {0, 60}, PlotRange -> {-.09, .02}, Frame -> True, Axes -> False]```

```Clear[f] scale = 1000000; f = ConstantArray[0, scale]; f[[1]] = N@MoebiusMu[1]; Monitor[Do[f[[i]] = N@MoebiusMu[i] + f[[i - 1]], {i, 2, scale}], i] xres = .002; xlist = Exp[Range[0, Log[scale], xres]]; tmax = 60; tres = .015; Monitor[errList = Table[(xlist^(-1/2 + I t).(f[[Floor[xlist]]] - 0*xlist)), {t, Range[0, 60, tres]}];, t] ListLinePlot[Im[errList]/Length[xlist], DataRange -> {0, 60}, PlotRange -> {-.02, .10}, Frame -> True, Axes -> False]```

```Clear[n, d]; Clear[f] scale = 1000000; f = ConstantArray[0, scale]; f[[1]] = Sum[d*MoebiusMu@d, {d, Divisors[1]}]; Monitor[Do[ f[[i]] = Sum[d*MoebiusMu@d, {d, Divisors[i]}] + f[[i - 1]], {i, 2, scale}], i] xres = .002; xlist = Exp[Range[0, Log[scale], xres]]; tmax = 60; tres = .015; Monitor[errList = Table[(xlist^(-1/2 + I t).(f[[Floor[xlist]]] - 0*xlist)), {t, Range[0, 60, tres]}];, t] ListLinePlot[Im[errList]/Length[xlist]/100000, DataRange -> {0, 60}, PlotRange -> {-.05, .05}, Frame -> True, Axes -> False]```

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.