Advertisement
MatsGranvik

Dirichlet divisor problem and Factorial summation limit

Jul 20th, 2023 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. Clear[c, cc, n, m];
  2. Sum[Sum[1, {k, Floor[n/(m + 1)] + 1, Floor[n/m - 1/m]}], {n, 1, nn}]
  3. cc = 6
  4. Table[Sum[
  5. Sum[Sum[1, {k, Floor[n/(m + 1)] + 1, Floor[n/m - 1/m]}], {n, 1,
  6. c }], {m, 1, c}], {c, 1, cc + 10}]
  7. Table[Sum[
  8. Sum[Sum[1, {k, Floor[n/(m + 1)] + 1, Floor[n/m - 1/m]}], {n, 1,
  9. c!}], {m, 1, 2*Floor[(c - 1)/2] + 1}], {c, 1, cc}]
  10. Table[-(1/4 c! (2 + c!) (-2 + 1/(1 + Floor[1/2 (-1 + c)])) +
  11. c! HarmonicNumber[1 + 2 Floor[1/2 (-1 + c)]]), {c, 1, cc}]
  12.  
  13. cc = 200
  14. Show[ListLinePlot[
  15. table = (Table[Sum[DivisorSigma[0, k], {k, n}], {n, 3, cc}] -
  16. Table[c*((1 +
  17. Log[-(1/(4) c! (2 + c!) (-2 + 1/(
  18. 1 + Floor[1/2 (-1 + c)])) +
  19. c! HarmonicNumber[1 + 2 Floor[1/2 (-1 + c)]])]/c/
  20. 2) + 2*EulerGamma - 1), {c, 3, cc}])]]
  21. ListLinePlot[Re[Accumulate[table] - 0/4*(Range[Length[table]])]]
  22. ListLinePlot[Re[Accumulate[table] - 1/4*(Range[Length[table]])]]
  23. ListLinePlot[
  24. Accumulate[Re[Accumulate[table] - 1/4*(Range[Length[table]])]]]
  25.  
  26.  
  27.  
  28. "start"
  29. nn = 150;
  30. Show[ListLinePlot[
  31. Table[Sum[If[And[n > 1*k, n < 2*k], n/k, 0], {k, 1, n}], {n, 1,
  32. nn}]], ListLinePlot[Table[n*Log[2/1] - 1, {n, 1, nn}],
  33. PlotStyle -> Red]]
  34. Show[ListLinePlot[
  35. Table[Sum[If[And[n > 2*k, n < 3*k], n/k, 0], {k, 1, n}], {n, 1,
  36. nn}]], ListLinePlot[Table[n*Log[3/2] - 1, {n, 1, nn}],
  37. PlotStyle -> Red]]
  38. Show[ListLinePlot[
  39. Table[Sum[If[And[n > 3*k, n < 4*k], n/k, 0], {k, 1, n}], {n, 1,
  40. nn}]], ListLinePlot[Table[n*Log[4/3] - 1, {n, 1, nn}],
  41. PlotStyle -> Red]]
  42. Show[ListLinePlot[
  43. Table[Sum[If[And[n > 4*k, n < 5*k], n/k, 0], {k, 1, n}], {n, 1,
  44. nn}]], ListLinePlot[Table[n*Log[5/4] - 1, {n, 1, nn}],
  45. PlotStyle -> Red]]
  46. Show[ListLinePlot[
  47. Table[Sum[If[And[n > 5*k, n < 6*k], n/k, 0], {k, 1, n}], {n, 1,
  48. nn}]], ListLinePlot[Table[n*Log[6/5] - 1, {n, 1, nn}],
  49. PlotStyle -> Red]]
  50. Show[ListLinePlot[
  51. Table[Sum[If[And[n > 6*k, n < 7*k], n/k, 0], {k, 1, n}], {n, 1,
  52. nn}]], ListLinePlot[Table[n*Log[7/6] - 1, {n, 1, nn}],
  53. PlotStyle -> Red]]
  54. Show[ListLinePlot[
  55. Table[Sum[If[And[n > 7*k, n < 8*k], n/k, 0], {k, 1, n}], {n, 1,
  56. nn}]], ListLinePlot[Table[n*Log[8/7] - 1, {n, 1, nn}],
  57. PlotStyle -> Red]]
  58.  
  59. ListLinePlot[
  60. Table[Sum[If[And[n > 1*k, n < 2*k], n/k, 0], {k, 1, n}] -
  61. n*Log[2/1] + 1, {n, 1, nn}]]
  62. ListLinePlot[
  63. Table[Sum[If[And[n > 2*k, n < 3*k], n/k, 0], {k, 1, n}] -
  64. n*Log[3/2] + 1, {n, 1, nn}]]
  65. ListLinePlot[
  66. Table[Sum[If[And[n > 3*k, n < 4*k], n/k, 0], {k, 1, n}] -
  67. n*Log[4/3] + 1, {n, 1, nn}]]
  68. ListLinePlot[
  69. Table[Sum[If[And[n > 4*k, n < 5*k], n/k, 0], {k, 1, n}] -
  70. n*Log[5/4] + 1, {n, 1, nn}]]
  71. ListLinePlot[
  72. Table[Sum[If[And[n > 5*k, n < 6*k], n/k, 0], {k, 1, n}] -
  73. n*Log[6/5] + 1, {n, 1, nn}]]
  74.  
  75. ListLinePlot[
  76. Accumulate[
  77. Table[Sum[If[And[n > 1*k, n < 2*k], n/k, 0], {k, 1, n}] -
  78. n*Log[2/1] + 1, {n, 1, nn}]] - 1/8]
  79. ListLinePlot[
  80. Accumulate[
  81. Table[Sum[If[And[n > 2*k, n < 3*k], n/k, 0], {k, 1, n}] -
  82. n*Log[3/2] + 1, {n, 1, nn}]] - 7/10]
  83. ListLinePlot[
  84. Accumulate[
  85. Table[Sum[If[And[n > 3*k, n < 4*k], n/k, 0], {k, 1, n}] -
  86. n*Log[4/3] + 1, {n, 1, nn}]] - 1]
  87. ListLinePlot[
  88. Accumulate[
  89. Table[Sum[If[And[n > 4*k, n < 5*k], n/k, 0], {k, 1, n}] -
  90. n*Log[5/4] + 1, {n, 1, nn}]] - 3/2]
  91. ListLinePlot[
  92. Accumulate[
  93. Table[Sum[If[And[n > 5*k, n < 6*k], n/k, 0], {k, 1, n}] -
  94. n*Log[6/5] + 1, {n, 1, nn}]]*2]
  95. "end"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement