MatsGranvik

A construction asymptotic to Sqrt[8*n]*Log[Sqrt[8*n]]^2

Jul 29th, 2020 (edited)
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. (*start*)(*Mathematica*)Clear[a, f, p];
  2. nn = 1000;
  3. f[n_] := n;
  4. a[n_] := DivisorSum[n, MoebiusMu[#] # &];
  5. Monitor[TableForm[
  6. A = Accumulate[
  7. Table[Table[If[n >= k, a[GCD[n, k]], 0], {k, 1, nn}], {n, 1,
  8. nn}]]];, n]
  9. TableForm[B = -Abs[A]];
  10. Clear[A];
  11. B[[All, 1]] = N[Table[f[n], {n, 1, nn}]];
  12. TableForm[B];
  13. TableForm[B1 = Sign[Transpose[Accumulate[Transpose[B]]]]];
  14. Quiet[g4 =
  15. Show[ListLinePlot[
  16. v = ReplaceAll[
  17. Flatten[Table[First[Position[B1[[n]], -1]], {n, 1, nn}]],
  18. First[{}] -> 1]],
  19. Plot[Sqrt[8*f[n]], {n, 1, nn}, PlotStyle -> {Red, Thick}],
  20. ImageSize -> Large]]
  21. Show[ListLinePlot[
  22. Table[Sum[
  23. 1, {k, 1, v[[n]]}]*(Sum[1/k, {k, 1, v[[n]]}] - EulerGamma)^2, {n,
  24. 1, nn}]],
  25. Plot[Sqrt[8*n]*Log[Sqrt[8*n]]^2, {n, 1, nn},
  26. PlotStyle -> {Red, Thick}], ImageSize -> Large]
  27. (*end*)
Add Comment
Please, Sign In to add comment