Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (*start*)
- Clear[rr, j, x]
- c = 300;
- Sum[(-1)^(n - 1)*x^Floor[Log[n]*c], {n, 1, 100}]
- rr = DeleteCases[roots = N[x /. NSolve[Total[%] == 0, x]],
- Indeterminate];
- Histogram[Abs[rr]];
- Graphics[{Pink,
- Line[{{Abs[Exp[-(1/2 + I*1)/c]], 0}, {Abs[Exp[-(1/2 + I*1)/c]],
- 800}}]}];
- Show[%%, %]
- ListPlot[Table[{Re[rr[[j]]], Im[rr[[j]]]}, {j, 1, Length[rr]}],
- AspectRatio -> 1]
- g1 = ListLinePlot[Sort[N[Abs[rr]]]];
- rr = N[Exp[-Table[1/2 + I*t, {t, 1, 1400}]/c]];
- g2 = ListLinePlot[N[Abs[rr]], PlotStyle -> Pink];
- Show[g1, g2]
- (*end*)
- (*version 2, logarithms approximated by von Mangoldt function matrix*)
- (*start*)
- Clear[rr, j, x]
- c = 500;
- nn = c;
- a[n_] := Total[Divisors[n]*MoebiusMu[Divisors[n]]];
- TableForm[
- b = Table[
- Sum[If[n == 1, 0, a[GCD[n, k]]/k], {k, 1, nn}], {n, 1, nn}]];
- log = Table[
- Sum[If[Mod[n, k] == 0, b[[n/k]], 0], {k, 1, n}], {n, 1, nn}];
- Show[ListLinePlot[log], Plot[Log[n], {n, 1, nn}, PlotStyle -> Pink]]
- polynomial = Sum[(-1)^(n - 1)*x^Floor[log[[n]]*c], {n, 1, nn}]
- rr = DeleteCases[roots = N[x /. NSolve[Total[%] == 0, x]],
- Indeterminate];
- ListPlot[Table[{Re[rr[[j]]], Im[rr[[j]]]}, {j, 1, Length[rr]}],
- AspectRatio -> 1]
- Histogram[Abs[rr]];
- Graphics[{Pink,
- Line[{{Abs[Exp[-(1/2 + I*1)/c]], 0}, {Abs[Exp[-(1/2 + I*1)/c]],
- 2000}}]}];
- Show[%%, %]
- g1 = ListLinePlot[Sort[N[Abs[rr]]]];
- rr = N[Exp[-Table[1/2 + I*t, {t, 1, 3000}]/c]];
- g2 = ListLinePlot[N[Abs[rr]], PlotStyle -> Pink];
- Show[g1, g2]
- (*end*)
Add Comment
Please, Sign In to add comment