The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138702 a(n) = number of terms in the continued fraction of the absolute value of B_n, the n-th Bernoulli number. 3
1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 6, 1, 2, 1, 7, 1, 7, 1, 4, 1, 4, 1, 6, 1, 2, 1, 6, 1, 7, 1, 7, 1, 2, 1, 10, 1, 2, 1, 8, 1, 2, 1, 3, 1, 5, 1, 10, 1, 3, 1, 7, 1, 7, 1, 6, 1, 6, 1, 17, 1, 2, 1, 7, 1, 10, 1, 2, 1, 7, 1, 23, 1, 2, 1, 2, 1, 5, 1, 18, 1, 5, 1, 16, 1, 2, 1, 10, 1, 14, 1, 6, 1, 2, 1, 18, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
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
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
Sequence in context: A319981 A052005 A346707 * A344339 A348364 A279620
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 26 2008
EXTENSIONS
More terms from Franklin T. Adams-Watters, May 14 2010
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 02:14 EDT 2024. Contains 372703 sequences. (Running on oeis4.)