MatsGranvik

Möbius function approximation by Matrix exponential

Aug 1st, 2020
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Clear[A, a, n, k, nn];
  2. nn = 600;
  3. a[n_] := Total[Divisors[n]*MoebiusMu[Divisors[n]]];
  4. Monitor[A =
  5. Table[If[n == 1, 0, Sum[a[GCD[n, k]]/N[k]/Log[n], {k, 1, nn}]], {n,
  6. 1, nn}];, n]
  7. ListPlot[b =
  8. MatrixExp[
  9. Table[Table[If[Mod[n, k] == 0, -A[[n/k]], 0], {k, 1, nn}], {n, 1,
  10. nn}]][[All, 1]], Filling -> 0];
  11. ListLinePlot[Accumulate[b]]
  12. ListPlot[b, Filling -> Axis]
  13. Round[b[[Range[42]]]]
Advertisement
Add Comment
Please, Sign In to add comment