OFFSET
1,2
LINKS
Steven Lubars, Table of n, a(n) for n = 1..71
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Steven Lubars, Aug 11 2015
STATUS
approved
