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.

Previous Showing 11-12 of 12 results.

A070154 Number of terms in the simple continued fraction expansion of Sum_{k=0..n}(-1)^k/(2k+1), the Leibniz-Gregory series for Pi/4.

Original entry on oeis.org

1, 3, 4, 9, 5, 9, 14, 10, 10, 19, 16, 21, 22, 22, 24, 20, 19, 24, 28, 28, 29, 30, 39, 31, 44, 40, 44, 33, 41, 47, 44, 48, 54, 48, 60, 49, 63, 51, 65, 72, 64, 70, 78, 64, 79, 77, 74, 87, 75, 86, 82, 94, 88, 106, 106, 94, 104, 108, 87, 107, 86, 106, 98, 110, 115, 110, 105, 115
Offset: 0

Views

Author

Benoit Cloitre, May 06 2002

Keywords

Comments

Pi/4 = Sum_{k=>0} (-1)^k/(2k+1).

Examples

			The simple continued fraction for Sum(k=0,10,(-1)^k/(2k+1)) is [0, 1, 4, 4, 1, 3, 54, 1, 2, 1, 1, 4, 11, 1, 2, 2] which contains 16 elements, hence a(10)=16.
		

Crossrefs

Programs

  • Mathematica
    lcf[f_] := Length[ContinuedFraction[f]]; lcf /@ Accumulate[Table[(-1)^k/(2*k + 1), {k, 0, 100}]] (* Amiram Eldar, Apr 29 2022 *)
  • PARI
    for(n=1,100,print1( length(contfrac(sum(i=0,n,(-1)^i/(2*i+1)))),","))

Formula

Limit_{n -> infinity} a(n)/n = C = 1.6...

Extensions

Offset changed to 0 and a(0) inserted by Amiram Eldar, Apr 29 2022

A215746 Numerator of Sum_{i=0..n} (-1)^i*4/(2*i + 1).

Original entry on oeis.org

4, 8, 52, 304, 1052, 10312, 147916, 135904, 2490548, 44257352, 47028692, 1023461776, 5385020324, 15411418072, 467009482388, 13895021563328, 14442004718228, 13926277743608, 533322720625196, 516197940314096, 21831981985010836, 911392701638017048, 937558224301357108
Offset: 0

Views

Author

Alonso del Arte, Aug 22 2012

Keywords

Comments

Denominator of the sum divides A025547(n+1), but is not always equal to it: the first exception is n = 32.
x(n) = Sum_{i=0..n} (-1)^i*4/(2*i+1) very slowly converges to Pi, with x(n) > Pi when n is even and x(n) < Pi when n is odd.

Examples

			a(2) = 52 because 4 - 4/3 + 4/5 = 60/15 - 20/15 + 12/15 = 52/15.
		

Crossrefs

Cf. A007509.

Programs

  • Maple
    N:= 100; # to get terms up to a[N]
    T[0]:= 4;
    A215746[0]:= 4;
    for i from 1 to N do
      T[i]:= T[i-1] + (-1)^i*4/(2*i+1);
      A215746[i]:= numer(T[i])
    od:
    [seq](A215746[i],i=0..N); # Robert Israel, Apr 27 2014
  • Mathematica
    Table[Numerator[Sum[(-1)^i 4/(2i + 1), {i, 0, n}]], {n, 0, 39}]

Extensions

Definition and comments corrected by Robert Israel, Apr 27 2014
Previous Showing 11-12 of 12 results.