Agreement between summatory von Mangoldt function and partial sums of von Mangoldt matrix

Edit 14.10.2012: Unfortunately copy pasting into wordpress makes the code show wrong, and it will not work.

Mathematica 8

aa = 32;
a = Range[aa]*0;
Monitor[Do[
T[n_, k_] :=
T[n, k] =
If[n < 1 || k n, T[k, n],
If[n > k, T[k, Mod[n, k, 1]], -Sum[T[n, i], {i, n – 1}]]]]];
A = Table[Table[T[n, k]/n, {n, 1, nn}], {k, 1, nn}];
A[[1, All]] = 0;
a[[nn]] = Total[Total[A]], {nn, 1, aa}], nn]
b = a;
c = Accumulate[Table[N[MangoldtLambda[n]], {n, 1, aa}]];
g2 = ListPlot[{c, b}, ImageSize -> Full]

Link to Pastebin with working code:
von Mangoldt function and von Mangoldt matrix

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