This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A071940 Number of 1's among the n first elements of the simple continued fraction for Pi. 0
 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, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 15, 15, 15, 16, 16, 17, 17, 17, 17, 18, 18, 19, 20, 20, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 28, 29, 30, 30, 30, 30, 30, 31, 31, 31, 31 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,6 COMMENTS a(100)/100 = 0,41 Does lim n ->infinity a(n)/n = (Log(4)-Log(3)) / Log(2) =0,415... the expected density of "1's" ? (cf. measure theory of continued fraction) LINKS EXAMPLE Continued fraction for Pi begins : 3, 7, 15, 1, 292, 1, 1,.... there are 3 "1's" among the 7 first terms, hence a(7)=3. PROG (PARI) for(n=1, 100, print1(sum(i=1, n, if(component(contfrac(Pi), i)-1, 0, 1)), ", ")) CROSSREFS Cf. A001203. Sequence in context: A174697 A176504 A196162 * A085883 A265912 A094192 Adjacent sequences:  A071937 A071938 A071939 * A071941 A071942 A071943 KEYWORD easy,nonn,cofr AUTHOR Benoit Cloitre, Jun 15 2002 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 26 10:45 EDT 2019. Contains 324375 sequences. (Running on oeis4.)