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

Number of terms in the simple continued fraction for Sum_{k=1..n} 1/k^2.
2

%I #16 Apr 30 2022 07:58:35

%S 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,

%T 38,47,52,49,54,40,49,49,69,57,67,78,67,67,68,67,64,65,86,76,81,92,79,

%U 83,83,95,82,85,80,84,95,92,91,121,105,100,108,111,109,118,105,110,88

%N Number of terms in the simple continued fraction for Sum_{k=1..n} 1/k^2.

%C Sum_{k>=1} 1/k^2 = zeta(2) = Pi^2/6.

%H Amiram Eldar, <a href="/A070985/b070985.txt">Table of n, a(n) for n = 1..10000</a>

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

%e 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.

%t lcf[f_] := Length[ContinuedFraction[f]]; lcf /@ Accumulate[Table[1/k^2, {k, 1, 100}]] (* _Amiram Eldar_, Apr 30 2022 *)

%o (PARI) for(n=1,100,print1(length(contfrac(sum(i=1,n,1/i^2))),","))

%Y Cf. A013679, A055573, A007406, A007407.

%K easy,nonn

%O 1,2

%A _Benoit Cloitre_, May 18 2002