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.

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

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, May 18 2002

Keywords

Comments

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

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.
		

Crossrefs

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