login

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”).

A070985
Number of terms in the simple continued fraction for Sum_{k=1..n} 1/k^2.
2
1, 2, 5, 7, 9, 7, 10, 20, 18, 14, 22, 19, 18, 24, 26, 24, 30, 30, 28, 37, 25, 30, 35, 35, 34, 38, 47, 52, 49, 54, 40, 49, 49, 69, 57, 67, 78, 67, 67, 68, 67, 64, 65, 86, 76, 81, 92, 79, 83, 83, 95, 82, 85, 80, 84, 95, 92, 91, 121, 105, 100, 108, 111, 109, 118, 105, 110, 88
OFFSET
1,2
COMMENTS
Sum_{k>=1} 1/k^2 = zeta(2) = Pi^2/6.
LINKS
FORMULA
Limit_{n ->infinity} a(n)/n = C =1.6....
EXAMPLE
The simple continued fraction for Sum_{k=1..10} 1/k^2 is [1, 1, 1, 4, 1, 1, 10, 4, 1, 2, 5, 2, 1, 24] which contains 14 terms, hence a(10) = 14.
MATHEMATICA
lcf[f_] := Length[ContinuedFraction[f]]; lcf /@ Accumulate[Table[1/k^2, {k, 1, 100}]] (* Amiram Eldar, Apr 30 2022 *)
PROG
(PARI) for(n=1, 100, print1(length(contfrac(sum(i=1, n, 1/i^2))), ", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 18 2002
STATUS
approved