A071529 Number of 1's among the elements of the simple continued fraction for (1+1/n)^n.
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
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.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
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)),","))
Comments