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-5 of 5 results.

A362284 a(n) is the least number k such that A138705(k) = n, or -1 if no such k exists.

Original entry on oeis.org

0, 1, 5, 10, 23, 6, 8, 20, 50, 18, 69, 66, 100, 45, 56, 42, 30, 40, 96, 99, 72, 234, 36, 348, 156, 200, 168, 120, 405, 390, 216, 315, 90, 198, 280, 270, 792, 210, 180, 624, 1120, 360, 576, 1188, 1134, 420, 750, 1140, 504, 1728, 660, 600, 690, 540, 630, 1380, 810
Offset: 1

Views

Author

Amiram Eldar, Apr 14 2023

Keywords

Crossrefs

Programs

  • Mathematica
    seq[len_, nmax_] := Module[{s = Table[-1, {len}], c = 0, n = 0, i}, While[c < len && n <= nmax, i = Length[ContinuedFraction[Abs[BernoulliB[2*n]]]]; If[i <= len && s[[i]] < 0, c++; s[[i]] = n]; n++]; s]; seq[60, 10^4]
  • PARI
    lista(len, nmax) = {my(s = vector(len,i,-1), c = 0, n = 0, i); while(c < len && n <= nmax, i = #contfrac(abs(bernfrac(2*n))); if(i <= len && s[i] < 0, c++; s[i] = n); n++); s;}

A362285 Indices of records of A138705.

Original entry on oeis.org

0, 1, 5, 6, 8, 18, 30, 36, 90, 180, 360, 420, 504, 540, 630, 810, 840, 1080, 1260, 1680, 1890, 2520, 3240, 3780, 4200, 5040, 7560, 10080, 12600, 21420, 30240, 32760, 37800, 42840, 50400, 60480, 64260, 65520, 83160, 98280, 128520
Offset: 1

Views

Author

Amiram Eldar, Apr 14 2023

Keywords

Comments

The corresponding record values are in A362286.

Crossrefs

Programs

  • Mathematica
    seq[kmax_] := Module[{s = {}, mx = 0, m}, Do[m = Length[ContinuedFraction[ Abs[BernoulliB[2*k]]]]; If[m > mx, mx = m; AppendTo[s, k]], {k, 0, kmax}]; s]; seq[1000]
  • PARI
    lista(kmax) = {my(mx = 0, m); for(k = 0, kmax, m = #contfrac(abs(bernfrac(2*k))); if(m > mx, mx = m; print1(k,", "))); }

Formula

A138705(a(n)) = A362286(n).

A362286 Record values in A138705.

Original entry on oeis.org

1, 2, 3, 6, 7, 10, 17, 23, 33, 39, 42, 46, 49, 54, 55, 57, 66, 73, 78, 83, 85, 95, 100, 105, 118, 133, 157, 162, 183, 201, 220, 224, 234, 242, 262, 272, 273, 287, 309, 314, 366
Offset: 1

Views

Author

Amiram Eldar, Apr 14 2023

Keywords

Comments

The corresponding indices of records are in A362285.

Crossrefs

Programs

  • Mathematica
    seq[kmax_] := Module[{s = {}, mx = 0, m}, Do[m = Length[ContinuedFraction[ Abs[BernoulliB[2*k]]]]; If[m > mx, mx = m; AppendTo[s, m]], {k, 0, kmax}]; s]; seq[1000]
  • PARI
    lista(kmax) = {my(mx = 0, m); for(k = 0, kmax, m = #contfrac(abs(bernfrac(2*k))); if(m > mx, mx = m; print1(m,", "))); }

Formula

a(n) = A138705(A362285(n)).

A138704 Irregular array read by rows: row n contains the continued fraction terms (in order) for the absolute value of B_{2n}, the (2n)th Bernoulli number.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Mar 26 2008

Keywords

Comments

The number of terms in row n is A138705(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 6 is (0,3,1,19,3,11).
		

Crossrefs

Programs

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

Extensions

More terms from 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-5 of 5 results.