OFFSET
1,6
EXAMPLE
The continued fraction for Pi begins: 3, 7, 15, 1, 292, 1, 1, ...; there are 3 "1's" among the first 7 terms, hence a(7)=3.
MATHEMATICA
Accumulate[If[#>1, 0, 1]&/@ContinuedFraction[Pi, 100]] (* Harvey P. Dale, Feb 27 2023 *)
PROG
(PARI) for(n=1, 100, print1(sum(i=1, n, if(component(contfrac(Pi), i)-1, 0, 1)), ", "))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Jun 15 2002
STATUS
approved