OFFSET
0,1
FORMULA
a(0) = floor(Pi); A(1) = Pi-a(0); a(2*n-1) = floor(1/A(2*n-1)); A(2*n) = 1-a(2*n-1)*A(2*n-1); a(2*n) = ceiling(1/A(2*n)) and A(2*n+1) = a(2*n)*A(2*n)-1 for n >= 1.
EXAMPLE
Pi = 3 + 1/7 - 1/(7*113) - 1/(7*113*4739) + 1/(7*113*4739*46804) + 1/(7*113*4739*46804*134370) - 1/(7*113*4739*46804*134370*614063) - 1/(7*113*4739*46804*134370*614063*1669512) + ...
From M. F. Hasler, Apr 09 2018: (Start)
Using the formulas given in the formula section, we get:
a(0) = 3, A(1) = Pi-3 = 0.14159..., a(1) = floor(1/A(1)) = floor(7.0626...) = 7,
A(2) = 1 - A(1)*a(1) = 0.00885..., a(2) = ceiling(1/A(2)) = 113,
A(3) = A(2)*a(2) - 1 = 0.000221..., a(3) = floor(1/A(3)) = 4739,
A(4) = 1 - A(3)*a(3) = 2.136585...e-5, a(4) = ceiling(1/A(2)) = 46804,
A(5) = A(4)*a(4) - 1 = 7.442125...e-7, a(5) = floor(1/A(3)) = 134370, ... (End)
PROG
(PARI) {A=Pi-a=3; for(n=0, oo, print1(a", "); A=abs(1-A*a=if(bittest(n, 0), ceil(1/A), 1\A)))} \\ M. F. Hasler, Apr 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), Jun 02 2000
EXTENSIONS
Better description and more terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 28 2001
STATUS
approved