Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*start*)(*Mathematica*)Clear[a, f, p];
- nn = 1000;
- f[n_] := n;
- a[n_] := DivisorSum[n, MoebiusMu[#] # &];
- Monitor[TableForm[
- A = Accumulate[
- Table[Table[If[n >= k, a[GCD[n, k]], 0], {k, 1, nn}], {n, 1,
- nn}]]];, n]
- TableForm[B = -Abs[A]];
- Clear[A];
- B[[All, 1]] = N[Table[f[n], {n, 1, nn}]];
- TableForm[B];
- TableForm[B1 = Sign[Transpose[Accumulate[Transpose[B]]]]];
- Quiet[g4 =
- Show[ListLinePlot[
- v = ReplaceAll[
- Flatten[Table[First[Position[B1[[n]], -1]], {n, 1, nn}]],
- First[{}] -> 1]],
- Plot[Sqrt[8*f[n]], {n, 1, nn}, PlotStyle -> {Red, Thick}],
- ImageSize -> Large]]
- Show[ListLinePlot[
- Table[Sum[
- 1, {k, 1, v[[n]]}]*(Sum[1/k, {k, 1, v[[n]]}] - EulerGamma)^2, {n,
- 1, nn}]],
- Plot[Sqrt[8*n]*Log[Sqrt[8*n]]^2, {n, 1, nn},
- PlotStyle -> {Red, Thick}], ImageSize -> Large]
- (*end*)
Add Comment
Please, Sign In to add comment