cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A261208 Terms of the Leibniz formula (as Euler product) that generate successively better approximations to Pi.

This page as a plain text file.
%I A261208 #48 May 20 2025 23:17:41
%S A261208 1,3,4,5,8,47,49,95,247,251,253,742,4268,4270,4288,11445,30123,30701,
%T A261208 30703,62592,62690,62992,3535871,3535872,3664203,3664204,3664214,
%U A261208 3664220,3665670,3665696,3665842,3665854,3665866,3708907,3708909,3708913,3708929,3708931,3708935,3708957,3708983,3708985,3709017
%N A261208 Terms of the Leibniz formula (as Euler product) that generate successively better approximations to Pi.
%H A261208 Steven Lubars, <a href="/A261208/b261208.txt">Table of n, a(n) for n = 1..71</a>
%H A261208 Wikipedia, <a href="https://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80#Euler_product">Euler Product</a>
%F A261208 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.
%F A261208 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).
%e A261208 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.
%e A261208 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).
%o A261208 (PARI) nearmul(p) = if (p % 4 == 1, p-1, p+1);
%o A261208 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
%o A261208 (MUMPS)
%o A261208 s Pi=3.141592653589793238,a=3,n=1,d=Pi-a
%o A261208 w !,1
%o A261208 f i=6:6:1e10 d
%o A261208   s L=i+1**.5\1
%o A261208   f j=i-1:2:i+1 d
%o A261208     f k=3:2:L q:'(j#k)
%o A261208     i j#k d
%o A261208       s a=a*j/(j#4+j-2),n=n+1
%o A261208       i $FN(Pi-a,"-")<d d
%o A261208         s d=$FN(Pi-a,"-")
%o A261208         w !,n ; _Steven Lubars_, Aug 14 2015
%Y A261208 Cf. A065091, A076342.
%K A261208 nonn
%O A261208 1,2
%A A261208 _Steven Lubars_, Aug 11 2015