OFFSET
0,2
COMMENTS
Pi/4 = Sum_{k=>0} (-1)^k/(2k+1).
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
FORMULA
Limit_{n -> infinity} a(n)/n = C = 1.6...
EXAMPLE
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.
MATHEMATICA
lcf[f_] := Length[ContinuedFraction[f]]; lcf /@ Accumulate[Table[(-1)^k/(2*k + 1), {k, 0, 100}]] (* Amiram Eldar, Apr 29 2022 *)
PROG
(PARI) for(n=1, 100, print1( length(contfrac(sum(i=0, n, (-1)^i/(2*i+1)))), ", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 06 2002
EXTENSIONS
Offset changed to 0 and a(0) inserted by Amiram Eldar, Apr 29 2022
STATUS
approved