Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #11 Jan 14 2021 21:14:46
%S 4,8,32,128,256,512,4096,32768,65536,131072,524288,2097152,4194304,
%T 8388608,134217728,2147483648,4294967296,8589934592,34359738368,
%U 137438953472,274877906944,549755813888,4398046511104,35184372088832
%N Starting with the fraction 4/1 as the first term, a(n) is the numerator of the reduced fraction of the n-th term according to the rule: if n is even, multiply the previous term by n/(n+1); otherwise multiply the previous term by (n+1)/n.
%C The fractions having these numerators slowly converge to Pi. The 1000th term at 2000-digit precision yields 3.1400...
%D John Derbshire, Prime Obsession, 2004, Joseph Henry Press, p. 16.
%H G. C. Greubel, <a href="/A113479/b113479.txt">Table of n, a(n) for n = 1..1000</a>
%e The first term is 4/1. Then the 2nd term is 4/1*2/(2 + 1) = 8/3. So 8 is the 2nd entry in the table.
%t a[1] := 4; a[n_] := a[n] = If[EvenQ[n], n*a[n - 1]/(n + 1), (n + 1)*a[n - 1]/n]; Numerator[Table[a[n], {n, 1, 50}]] (* _G. C. Greubel_, Mar 12 2017 *)
%o (PARI) g(n) = { a=4;b=1; print1(4","); for(x=2,n, if(x%2==0,a=a*x;b=b*(x+1),a=a*(x+1);b=b*x); print1(numerator(a/b)",") ) }
%K easy,frac,nonn
%O 1,1
%A _Cino Hilliard_, Jan 09 2006