The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function

 Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B]
10-23-2021, 02:49 PM
Post: #1
 Gerson W. Barbosa Senior Member Posts: 1,605 Joined: Dec 2013
Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B]
FWIW,

A new method for the fast evaluation of ζ(2) using the definition as a basis

The series, 1 + 1/4 + 1/9 + 1/25 + 1/36 + 1/49…, converges very slowly to the exact result, π^2/6. In order to obtain n correct digits the series should be evaluated up to the (10^n)th term. However, the addition of n+1 terms of a simple continued fraction after the evaluation of the first n terms of the series will significantly speed up the rate of convergence, yielding slightly more than 2n correct digits.

For example,

for n = 3,

1+1/4+1/9+1/((3+1/2)+1/(12*(3+1/2)+16/(5*(3+1/2)+81/(28*(3+1/2))))) = 55783/33912 = 1.6449339

The coefficients of the denominators of the continued fraction, 12, 5, 28, 9, 44, 13…, obey the formula k(i) = (5 - 3*(-1)^i)*(i + 1/2). The numerators, 1, 16, 81, 256, 625, 1296…, are quite obvious.

HP-42S/Free42 program:

Code:
 00 { 65-Byte Prgm } 01▸LBL "z" 02 0.5 03 + 04 STO 01 05 IP 06 0 07 STO 02 08▸LBL 00 09 RCL ST Y 10 X↑2 11 1/X 12 + 13 -1 14 RCL ST Z 15 Y↑X 16 +/- 17 3 18 × 19 5 20 + 21 0.5 22 RCL+ ST T 23 × 24 RCL× 01 25 RCL+ 02 26 R↑ 27 X↑2 28 X↑2 29 X<>Y 30 ÷ 31 STO 02 32 R↓ 33 DSE ST Y 34 GTO 00 35 RCL 02 36 RCL+ 01 37 1/X 38 + 39 END

n = 12 on the HP-42S and n = 16 on Free42 will suffice for 12 and 34 correct digits, respectively.

6 XEQ “z” → 1.64493406685

16 XEQ “z” →

1.644934066848226436472415166646025

HP-71B BASIC program;

Code:
 10 S=0 15 C=0 20 INPUT N 25 K=N+.5 30 A=3-6*MOD(N,2) 35 FOR I=N TO 1 STEP -1 40 S=S+1/(I*I) 45 C=I^4/(C+K*(5-A)*(I+.5)) 50 A=-A 55 NEXT I 60 DISP S+1/(K+C)

RUN

? 6

1.64493406685

Interested readers are invited to provide

- optimized versions of the given programs;

- versions for other calculator, such as the HP-41;

- a proof (I don’t have any – this is the result of a Friday afternoon work only, which until minutes ago I thought to be a Saturday afternoon. Still looking like Sunday morning to me).

Pointing out typos and mistakes, either math or grammar related, are welcome.

Gerson.
 « Next Oldest | Next Newest »

 Messages In This Thread Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Gerson W. Barbosa - 10-23-2021 02:49 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 10-25-2021, 01:29 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Gerson W. Barbosa - 10-26-2021, 02:12 AM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 10-26-2021, 09:47 AM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 10-26-2021, 08:28 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 10-29-2021, 02:16 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-01-2021, 10:42 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Gerson W. Barbosa - 11-02-2021, 12:28 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 10-27-2021, 05:12 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-04-2021, 08:35 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Ren - 10-26-2021, 02:13 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - floppy - 10-26-2021, 03:04 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 10-26-2021, 03:24 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Gerson W. Barbosa - 10-26-2021, 03:58 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Ren - 10-27-2021, 01:32 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 10-31-2021, 03:40 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-05-2021, 03:55 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-01-2021, 12:56 AM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Gerson W. Barbosa - 11-01-2021, 05:04 AM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-03-2021, 12:38 AM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-03-2021, 01:14 AM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-03-2021, 11:28 PM RE: Evaluation of ζ(2) by the definition (sort of) [HP-42S & HP-71B] - Albert Chan - 11-04-2021, 10:42 PM

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