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.

A071529 Number of 1's among the elements of the simple continued fraction for (1+1/n)^n.

Original entry on oeis.org

0, 0, 1, 1, 1, 4, 7, 7, 12, 5, 8, 10, 23, 18, 25, 14, 18, 17, 14, 24, 22, 22, 35, 15, 21, 30, 29, 33, 37, 30, 27, 47, 49, 44, 54, 55, 53, 51, 46, 46, 43, 60, 64, 65, 79, 64, 64, 67, 73, 66, 79, 68, 60, 76, 86, 85, 85, 83, 86, 74, 90, 84, 93, 106, 90, 85, 98, 107, 88, 104, 86
Offset: 1

Views

Author

Benoit Cloitre, Jun 02 2002

Keywords

Comments

It seems that lim_{n->infinity} a(n)/A069887(n) = C = 0.41..., which is close to (log(4)-log(3))/log(2)=0.415..., the expected density of 1's (cf. measure theory of continued fractions).

Examples

			(1+1/14)^14 has for continued fraction [2, 1, 1, 1, 2, 6, 1, 7, 1, 6, 2, 1, 4, 21, 1, 1, 7, 1, 1, 1, 3, 2, 7, 2, 7, 1, 2, 4, 1, 3, 2, 1, 1, 1, 5, 1, 2, 5, 1, 2] which contains 18 "1's" hence a(14)=18.
		

Programs

  • Mathematica
    Table[Count[ContinuedFraction[(1+1/n)^n],1],{n,80}] (* Harvey P. Dale, Mar 11 2013 *)
  • PARI
    for(n=1,100,s=(1+1/n)^n; print1(sum(i=1,length(contfrac(s)),if(1-component(contfrac(s),i),0,1)),","))