OFFSET
0,2
COMMENTS
The continued fraction terms being counted include the initial 0, if there is one. (a(n), for all odd n >= 3, is 1.)
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16383
EXAMPLE
The 12th Bernoulli number is -691/2730. Now 691/2730 has the continued fraction 0 + 1/(3 + 1/(1 + 1/(19 + 1/(3 + 1/11)))), which has 6 terms (including the zero). So a(12) = 6.
PROG
(PARI)
lcf(x)=local(r); r=1; while(1, x-=floor(x); if(x==0, return(r)); x=1/x; r++)
a(n)=lcf(abs(bernfrac(n))) \\ Franklin T. Adams-Watters, May 14 2010
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 26 2008
EXTENSIONS
More terms from Franklin T. Adams-Watters, May 14 2010
STATUS
approved