Advertisement
MatsGranvik

Dirichlet divisor problem and Hurwitz zeta function

Nov 26th, 2022 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. Clear[a, b, c, n, s, cc];
  2. nn = 100;
  3. (*Limit[Sum[1/k^s,{k,1,n/q}],n->1234]
  4. Limit[Sum[1/k^s,{k,1,q*n}],n->1234]*)
  5. s = N[0, 20];
  6. Clear[n, k, q];
  7. Show[ListPlot[
  8. A = Table[Re[Sum[Sum[1/k^s, {k, 1, n/q}], {q, 1, n}]], {n, 1, nn}]],
  9. ListLinePlot[
  10. B = Table[
  11. Re[Sum[Zeta[s] - HurwitzZeta[s, n/q + EulerGamma], {q, 1, n}] +
  12. HarmonicNumber[n, s + 1]/(2 + s)], {n, 1, nn}],
  13. PlotStyle -> Red]]
  14. ListLinePlot[A - B]
  15.  
  16.  
  17. (*start*)
  18. Clear[a, b, c, sigma, n, s, cc];
  19. nn = 100;
  20. a = 2;
  21. b = 4;
  22. c = 5;
  23. Limit[Sum[1/k^s, {k, 1, a*n}], n -> 100]
  24. cc = N[Im[ZetaZero[1]], 30];
  25. sigma = 1/1;
  26. s = sigma + cc*I;
  27. Clear[n];
  28. Show[ListPlot[Table[Re[Sum[1/k^s, {k, 1, a*n}]], {n, 1, nn}]],
  29. ListLinePlot[
  30. Table[Re[Zeta[s] - HurwitzZeta[s, a*n + 1]], {n, 1, nn}],
  31. PlotStyle -> Red]]
  32. Show[ListPlot[Table[Im[Sum[1/k^s, {k, 1, a*n}]], {n, 1, nn}]],
  33. ListLinePlot[
  34. Table[Im[Zeta[s] - HurwitzZeta[s, a*n + 1]], {n, 1, nn}],
  35. PlotStyle -> Black]]
  36. (*end*)
  37.  
  38. (*start*)
  39. Clear[a, b, c, n, s, cc];
  40. nn = 210;
  41. (*Limit[Sum[1/k^s,{k,1,n/q}],n->2022]
  42. Limit[Sum[1/k^s,{k,1,q*n}],n->2022]*)
  43. s = 0;
  44. Clear[n, k, q];
  45. n1 = 7;
  46. Show[ListPlot[
  47. A = Table[
  48. Re[Sum[Sum[1/k^s, {k, 1, n/q}], {q, 1, n1}]], {n, 1, nn}]],
  49. ListLinePlot[
  50. B = Table[
  51. Re[Sum[Zeta[s] - HurwitzZeta[s, n/q + 1], {q, 1, n1}]] - 1/4 -
  52. 2/6 - 3/8 - 4/10 - 5/12 - 6/14, {n, 1, nn}], PlotStyle -> Red]]
  53. ListLinePlot[A - B]
  54. Mean[A - B]
  55. (*end*)
  56.  
  57. (*start better*)
  58. Clear[a, b, c, n, s, cc];
  59. nn = 200;
  60. (*Limit[Sum[1/k^s,{k,1,n/q}],n->1234]
  61. Limit[Sum[1/k^s,{k,1,q*n}],n->1234]*)
  62. s = 0
  63. Clear[n, k, q, n1];
  64. Show[ListPlot[
  65. A = Table[Re[Sum[Sum[1/k^s, {k, 1, n/q}], {q, 1, n}]], {n, 1, nn}]],
  66. ListLinePlot[
  67. B = Table[
  68. Re[Sum[Zeta[s] - HurwitzZeta[s, n/q + 1], {q, 1, n}] +
  69. Sum[(-q + 1)/q/2*(n/q)^(-s), {q, 1, n}]] + n*EulerGamma -
  70. n/2, {n, 1, nn}], PlotStyle -> Red]]
  71. ListLinePlot[A - B]
  72. (*end better*)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement