Evaluation of ζ(2) by the definition (sort of) [HP42S & HP71B]

10252021, 01:29 PM
(This post was last modified: 10252021 07:16 PM by Albert Chan.)
Post: #2




RE: Evaluation of ζ(2) by the definition (sort of) [HP42S & HP71B]
Code: function zeta2(n) This lua code loop from n down to 2 instead of n to 1. Note: for n = 0, this return 1.4 instead of 2. lua> for n=0,8 do print(n, zeta2(n)) end 0 1.4 1 1.6428571428571428 2 1.644949494949495 3 1.644933946685539 4 1.6449340678010402 5 1.6449340668406054 6 1.6449340668482877 7 1.644934066848226 8 1.6449340668482264 Convergence speed very impressive, n=8 converged to float(pi^2/6) How did you derive the continued fraction form ? I was reading Why pi^2 so close to 10 ? With pi^2 ≈ 10, pi^2/6 ≈ 5/3 5/3 = 1 + sum(4/(4*k^21), k=2..inf) // terms telescopically cancel, leaving only 5/3 ζ(2) = 1 + sum(1/k^2, k=2..inf) 5/3  ζ(2) = sum(4/(4*k^21)  1/k^2, k=2..inf) ζ(2) = 5/3  sum(1/(k^2*(4*k^21)), k=2..inf) We might as well pull 1 term out. (pi^2/6 ≈ 9.9/6 = 1.65) ζ(2) = 1.65  sum(1/(k^2*(4*k^21)), k=3..inf) With denominator of O(k^4), this converge much faster than ζ(2) "definition" How can we accelerate this with continued fraction ?  This converge even faster, A cute sum of Ramanujan zeta2(n) := (10  sum(1/(k*(k+1))^3, k=1..n)) / 6 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)