A070985 Number of terms in the simple continued fraction for Sum_{k=1..n} 1/k^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
Examples
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
lcf[f_] := Length[ContinuedFraction[f]]; lcf /@ Accumulate[Table[1/k^2, {k, 1, 100}]] (* Amiram Eldar, Apr 30 2022 *)
-
PARI
for(n=1,100,print1(length(contfrac(sum(i=1,n,1/i^2))),","))
Formula
Limit_{n ->infinity} a(n)/n = C =1.6....
Comments