login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261208 Terms of the Leibniz formula (as Euler product) that generate successively better approximations to Pi. 2
1, 3, 4, 5, 8, 47, 49, 95, 247, 251, 253, 742, 4268, 4270, 4288, 11445, 30123, 30701, 30703, 62592, 62690, 62992, 3535871, 3535872, 3664203, 3664204, 3664214, 3664220, 3665670, 3665696, 3665842, 3665854, 3665866, 3708907, 3708909, 3708913, 3708929, 3708931, 3708935, 3708957, 3708983, 3708985, 3709017 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Wikipedia, Euler Product
FORMULA
Pi = 4*b(1)*b(2)*b(3)*... where b(n) is the n-th odd prime (A065091) divided by its nearest multiple of 4.
Let c(n) be the n-th term of the expansion such that c(n) = 4*b(1)*...*b(n). The sequence consists of the values n such that c(n) provides a closer approximation of Pi than previous approximations c(1)...c(n-1).
EXAMPLE
Calculating the first 8 terms: c(1)=3, c(2)=3.75, c(3)=3.28125, c(4)=3.0078125, c(5)=3.2584635416, c(6)=3.462117513020833, c(7)=3.289011637369791, c(8)=3.1519694858127165.
In the above sequence, terms 1, 3, 4, 5, and 8 provide successively closer approximations of Pi (whereas approximations 2, 6, and 7 do not).
PROG
(PARI) nearmul(p) = if (p % 4 == 1, p-1, p+1);
lista(nn) = {print1(lb = 1, ", "); v = 3; ld = abs(Pi-3); for (n=2, nn, np = prime(n+1); v *= np/nearmul(np); if ((nld=abs(Pi-v)) < ld, print1(n, ", "); ld = nld); ); } \\ Michel Marcus, Aug 14 2015
(MUMPS)
s Pi=3.141592653589793238, a=3, n=1, d=Pi-a
w !, 1
f i=6:6:1e10 d
. s L=i+1**.5\1
. f j=i-1:2:i+1 d
. . f k=3:2:L q:'(j#k)
. . i j#k d
. . . s a=a*j/(j#4+j-2), n=n+1
. . . i $FN(Pi-a, "-")<d d
. . . . s d=$FN(Pi-a, "-")
. . . . w !, n ; Steven Lubars, Aug 14 2015
CROSSREFS
Sequence in context: A049931 A335436 A058983 * A010375 A095028 A011246
KEYWORD
nonn
AUTHOR
Steven Lubars, Aug 11 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 17:02 EDT 2024. Contains 371962 sequences. (Running on oeis4.)