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.

Showing 1-3 of 3 results.

A138705 a(n) is the number of terms in the continued fraction of the absolute value of B_{2n}, the (2n)-th Bernoulli number.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 6, 2, 7, 7, 4, 4, 6, 2, 6, 7, 7, 2, 10, 2, 8, 2, 3, 5, 10, 3, 7, 7, 6, 6, 17, 2, 7, 10, 2, 7, 23, 2, 2, 5, 18, 5, 16, 2, 10, 14, 6, 2, 18, 2, 9, 5, 7, 6, 18, 4, 15, 2, 6, 2, 17, 2, 2, 15, 7, 9, 12, 2, 8, 11, 12, 2, 21, 2, 6, 14, 2, 4, 23, 2
Offset: 0

Views

Author

Leroy Quet, Mar 26 2008

Keywords

Comments

The continued fraction terms being counted include the initial 0, if there is one.

Examples

			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(6) = 6.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[ContinuedFraction[Abs[BernoulliB[2*n]]]], {n, 0, 100}] (* Vaclav Kotesovec, Oct 03 2019 *)
  • PARI
    a(n) = #contfrac(abs(bernfrac(2*n))); \\ Jinyuan Wang, Aug 07 2021
    
  • Python
    from sympy import continued_fraction, bernoulli
    def A138705(n): return len(continued_fraction(abs(bernoulli(n<<1)))) # Chai Wah Wu, Apr 14 2023

Extensions

a(8)-a(70) from Lars Blomberg, Mar 16 2012

A138701 Irregular array read by rows: row n contains the continued fraction terms (in order) for the absolute value of B_n, the n-th Bernoulli number.

Original entry on oeis.org

1, 0, 2, 0, 6, 0, 0, 30, 0, 0, 42, 0, 0, 30, 0, 0, 13, 5, 0, 0, 3, 1, 19, 3, 11, 0, 1, 6, 0, 7, 10, 1, 5, 1, 2, 2, 0, 54, 1, 33, 1, 2, 3, 2, 0, 529, 8, 20, 2, 0, 6192, 8, 8, 2, 0, 86580, 3, 1, 19, 3, 11, 0, 1425517, 6, 0, 27298231, 14, 1, 2, 1, 14, 0, 601580873, 1, 9, 15, 2, 7, 6, 0
Offset: 0

Views

Author

Leroy Quet, Mar 26 2008

Keywords

Comments

Row n, for all odd n >= 3, is (0).
The number of terms in row n is A138702(n).

Examples

			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)))). So row 12 is (0,3,1,19,3,11).
		

Crossrefs

Programs

  • Maple
    A138701row := proc(n) local B; B := abs(bernoulli(n)) ; numtheory[cfrac](B,20,'quotients') ; end: seq(op(A138701row(n)),n=0..80) ; # R. J. Mathar, Jul 20 2009
  • Mathematica
    Array[ContinuedFraction@ Abs@ BernoulliB@ # &, 31, 0] // Flatten (* Michael De Vlieger, Oct 18 2017 *)

Extensions

Extended by R. J. Mathar, Jul 20 2009

A138706 a(n) is the sum of the terms in the continued fraction expansion of the absolute value of B_{2n}, the (2n)-th Bernoulli number.

Original entry on oeis.org

1, 6, 30, 42, 30, 18, 37, 7, 28, 96, 559, 6210, 86617, 1425523, 27298263, 601580913, 15116315788, 429614643067, 13711655205344, 488332318973599, 19296579341940107, 841693047573684421, 40338071854059455479, 2115074863808199160579, 120866265222965259346062
Offset: 0

Views

Author

Leroy Quet, Mar 26 2008

Keywords

Examples

			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)))). So a(6) = 0 + 3 + 1 + 19 + 3 + 11 = 37.
		

Crossrefs

Programs

  • Maple
    A138704row := proc(n) local B; B := abs(bernoulli(2*n)) ; numtheory[cfrac](B,20,'quotients') ; end: A138706 := proc(n) add(c,c=A138704row(n)) ; end: seq(op(A138706(n)),n=0..30) ; # R. J. Mathar, Jul 20 2009
  • Mathematica
    Table[Total[ContinuedFraction[Abs[BernoulliB[2n]]]],{n,0,25}] (* Harvey P. Dale, Feb 23 2012 *)
  • PARI
    a(n) = vecsum(contfrac(abs(bernfrac(2*n)))); \\ Jinyuan Wang, Aug 07 2021
    
  • Python
    from sympy import continued_fraction, bernoulli
    def A138706(n): return sum(continued_fraction(abs(bernoulli(n<<1)))) # Chai Wah Wu, Apr 14 2023

Formula

a(n) = A138703(2*n). - R. J. Mathar, Jul 20 2009

Extensions

a(7)-a(22) from R. J. Mathar, Jul 20 2009
More terms from Jinyuan Wang, Aug 07 2021
Showing 1-3 of 3 results.