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.
%I A071940 #19 Aug 04 2024 13:36:45 %S A071940 0,0,0,1,1,2,3,4,4,5,5,6,6,6,7,8,8,8,8,8,9,9,9,10,11,11,11,11,12,12, %T A071940 12,12,12,12,13,13,13,13,13,13,14,15,15,15,16,16,17,17,17,17,18,18,19, %U A071940 20,20,21,22,23,23,24,25,25,26,27,27,28,28,29,30,30,30,30,30,31,31,31,31 %N A071940 Number of 1's among the first n terms of the simple continued fraction for Pi. %e A071940 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. %t A071940 Accumulate[If[#>1,0,1]&/@ContinuedFraction[Pi,100]] (* _Harvey P. Dale_, Feb 27 2023 *) %o A071940 (PARI) for(n=1,100,print1(sum(i=1,n,if(component(contfrac(Pi),i)-1,0,1)),",")) %Y A071940 Cf. A001203. %K A071940 easy,nonn %O A071940 1,6 %A A071940 _Benoit Cloitre_, Jun 15 2002