Mertens function

Mathematica


nn = 1000
Monitor[aa =
Table[Sum[MoebiusMu[k]*Floor[n/k]^(0), {k, 1, n}], {n, 1, nn}];, n]
Monitor[bb =
Table[Sum[MoebiusMu[k]*Floor[n/k]^(1/2), {k, 1, n}], {n, 1, nn}];,
n + 1000]
Monitor[cc = Table[(6/Pi^2)*n^(1/2), {n, 1, nn}];, n + 2000]
ListLinePlot[{aa, bb, -cc, bb + 2*cc - 2*cc[[1]], cc},
ImageSize -> Full]

Print["These are equal:"]
Clear[t];
nn = 12;
rowsumexponent = 1/2;
t[n_, k_] :=
t[n, k] =
If[n = k, t[Floor[n/k], 1]]]]];
MatrixForm[Table[Table[t[n, k], {k, 1, 12}], {n, 1, 12}]];
gg = Table[t[n, 1], {n, 1, 12}];
dd = Table[
Sum[MoebiusMu[k]*Floor[n/k]^(rowsumexponent), {k, 1, n}], {n, 1,
nn}];
MatrixForm[Transpose[{gg, dd, dd - gg}]]

Print["But unfortunately these are not equal:"]
Clear[t];
nn = 12;
rowsumexponent = 1/2;
t[n_, k_] :=
t[n, k] =
If[n = k, t[Floor[n/k], 1]]]]];
MatrixForm[Table[Table[t[n, k], {k, 1, 12}], {n, 1, 12}]];
gg = Table[t[n, 1], {n, 1, 12}];
dd = (6/Pi^2)*
Table[Sum[MoebiusMu[k]*Floor[n/k]^(rowsumexponent), {k, 1, n}], {n,
1, nn}];
MatrixForm[Transpose[{gg, dd, dd - gg}]]

Mertens function in the middle

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