Advertisement
MatsGranvik

f(x) divided by 8 gives asymptotic sqrt(f(x))

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