MatsGranvik

Roots of the Dirichlet eta function plotted

Oct 29th, 2021 (edited)
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. https://oeis.org/draft/A348702
  2.  
  3. (*start*)
  4. (*Mathematica 8*)
  5. (*Dirichlet eta function*)
  6. Clear[m, s, n, k];
  7. n = 100;(*Increase k=100 for better precision*)$MaxRootDegree =
  8. Round[Log[n]*n] + 10;
  9. Monitor[s =
  10. Table[n*(-Log[
  11. Root[Sum[(-1)^(k + 1)*#1^Round[Log[k]*n], {k, 1, n}] &,
  12. m]]), {m, 1, Round[Log[n]*n]}];, n]
  13. "Real parts of zeros:"
  14. ListPlot[Re[N[s]]]
  15. "Real parts of zeros sorted:"
  16. Show[ListLinePlot[Sort[Re[N[s]]], PlotRange -> {Min[Re[N[s]]] - 1, 2},
  17. PlotStyle -> Thickness[0.004]],
  18. Graphics[Line[{{0, 1/2}, {150, 1/2}}]], ImageSize -> Large]
  19. "Imaginary parts of zeros:"
  20. ListLinePlot[Im[N[s]]]
  21. "Imaginary parts of zeros sorted:"
  22. ListLinePlot[Sort[Im[N[s]]]]
  23. "Plot of the zeros in the complex plane:"
  24. ListPlot[Table[{Re[s[[n]]], Im[s[[n]]]}, {n, 1, Length[s]}]]
  25. (*end*)
  26.  
  27. (*shorter program*)
  28. (*start*)(*Mathematica 8*)(*Dirichlet eta function*)
  29. Clear[m, s, n, k];
  30. n = 100;(*Increase k=100 for better precision*)$MaxRootDegree =
  31. Round[Log[n]*n] + 10;
  32. Monitor[s =
  33. Table[-n*(Log[
  34. Root[Sum[(-1)^(k + 1)*#1^Round[Log[k]*n], {k, 1, n}] &,
  35. m]]), {m, Round[Log[n]*n*3/4], Round[Log[n]*n]}];, n]
  36. "Plot of the zeros in the complex plane:"
  37. ListPlot[Table[{Re[s[[n]]], Im[s[[n]]]}, {n, 1, Length[s]}]]
  38. (*end*)
  39.  
  40. (*start*)
  41. Clear[s, k, number]
  42. number = 1;
  43. s = 11;
  44. k = 5;
  45. FullSimplify[Exp[-s/number]^(Log[k]*number)]
  46. 1/k^s
  47. (*end*)
  48.  
Add Comment
Please, Sign In to add comment