Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*start*)
- (*Mathematica*)
- Clear[a, f, p];
- nn = 2000;
- p = 1;
- f[n_] := n*Log[n]^p;
- 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]/8, {n, 1, nn}]];
- TableForm[B];
- TableForm[B1 = Sign[Transpose[Accumulate[Transpose[B]]]]];
- Clear[B];
- Quiet[Show[
- ListLinePlot[
- v = ReplaceAll[
- Flatten[Table[First[Position[B1[[n]], -1]], {n, 1, nn}]],
- First[{}] -> 1], PlotStyle -> Blue],
- Plot[Sqrt[f[n]], {n, 1, nn}, PlotStyle -> {Red, Thick}],
- ImageSize -> Large]]
- ListLinePlot[v/Table[Sqrt[f[n]], {n, 1, nn}]]
- (*end*)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement