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

A165884 Irregular table of negated A080092 and a leading column of 1's.

Original entry on oeis.org

1, 1, -2, 1, -2, -3, 1, -2, -3, -5, 1, -2, -3, -7, 1, -2, -3, -5, 1, -2, -3, -11, 1, -2, -3, -5, -7, -13, 1, -2, -3, -1, -2, -3, -5, -17
Offset: 0

Views

Author

Paul Curtz, Sep 29 2009

Keywords

Comments

The von Staudt-Clausen decomposition of nonzero Bernoulli numbers (see A164555 and A006954) states B(0)=1, B(1) = 1/2 = 1-1/2, B(2) = 1/6 = 1-1/2-1/3, B(4) = -1/30 = 1-1/2-1/3-1/5 etc.
We consider the denominators of the fractions in these sums, one sum per row. The first term in the sums is essentially the sequence of two 1's followed by A000146; this contributes a first column to this sequence here compared with table A080092.

Examples

			1;
1, -2;
1, -2, -3;
1, -2, -3, -5;
1, -2, -3, -7;
1, -2, -3, -5;
1, -2, -3, -11;
1, -2, -3, -5, -7, -13;
1, -2, -3;
		

Crossrefs

Cf. A046886 (row lengths minus 1), A000146.

A027642 Denominator of Bernoulli number B_n.

Original entry on oeis.org

1, 2, 6, 1, 30, 1, 42, 1, 30, 1, 66, 1, 2730, 1, 6, 1, 510, 1, 798, 1, 330, 1, 138, 1, 2730, 1, 6, 1, 870, 1, 14322, 1, 510, 1, 6, 1, 1919190, 1, 6, 1, 13530, 1, 1806, 1, 690, 1, 282, 1, 46410, 1, 66, 1, 1590, 1, 798, 1, 870, 1, 354, 1, 56786730, 1
Offset: 0

Views

Author

Keywords

Comments

Row products of A138243. - Mats Granvik, Mar 08 2008
From Gary W. Adamson, Aug 09 2008: (Start)
Equals row products of triangle A143343 and for a(n) > 1, row products of triangle A080092.
Julius Worpitzky's 1883 algorithm for generating Bernoulli numbers is described in A028246. (End)
The sequence of denominators of B_n is defined here by convention, not by necessity. The convention amounts to mapping 0 to the rational number 0/1. It might be more appropriate to regard numerators and denominators of the Bernoulli numbers as independent sequences N_n and D_n which combine to B_n = N_n / D_n. This is suggested by the theorem of Clausen which describes the denominators as the sequence D_n = 1, 2, 6, 2, 30, 2, 42, ... which combines with N_n = 1, -1, 1, 0, -1, 0, ... to the sequence of Bernoulli numbers. (Cf. A141056 and A027760.) - Peter Luschny, Apr 29 2009

Examples

			The sequence of Bernoulli numbers B_n (n = 0, 1, 2, ...) begins 1, -1/2, 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66, 0, -691/2730, 0, 7/6, 0, -3617/510, ... [Clarified by _N. J. A. Sloane_, Jun 02 2025]
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 810.
  • Jacob Bernoulli, Ars Conjectandi, Basel: Thurneysen Brothers, 1713. See page 97.
  • Thomas Clausen, "Lehrsatz aus einer Abhandlung Über die Bernoullischen Zahlen", Astr. Nachr. 17 (1840), 351-352 (see P. Luschny link).
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 106-108.
  • H. T. Davis, Tables of the Mathematical Functions. Vols. 1 and 2, 2nd ed., 1963, Vol. 3 (with V. J. Fisher), 1962; Principia Press of Trinity Univ., San Antonio, TX, Vol. 2, p. 230.
  • L. M. Milne-Thompson, Calculus of Finite Differences, 1951, p. 137.
  • Roger Plymen, The Great Prime Number Race, AMS, 2020. See pp. 8-10.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 161.

Crossrefs

See A027641 (numerators) for full list of references, links, formulas, etc.

Programs

  • Haskell
    a027642 n = a027642_list !! n
    a027642_list = 1 : map (denominator . sum) (zipWith (zipWith (%))
       (zipWith (map . (*)) (tail a000142_list) a242179_tabf) a106831_tabf)
    -- Reinhard Zumkeller, Jul 04 2014
    
  • Magma
    [Denominator(Bernoulli(n)): n in [0..150]]; // Vincenzo Librandi, Mar 29 2011
    
  • Maple
    (-1)^n*sum( (-1)^'m'*'m'!*stirling2(n,'m')/('m'+1),'m'=0..n);
    A027642 := proc(n) denom(bernoulli(n)) ; end: # Zerinvary Lajos, Apr 08 2009
  • Mathematica
    Table[ Denominator[ BernoulliB[n]], {n, 0, 68}] (* Robert G. Wilson v, Oct 11 2004 *)
    Denominator[ Range[0, 68]! CoefficientList[ Series[x/(E^x - 1), {x, 0, 68}], x]]
    (* Alternative code using Clausen Theorem: *)
    A027642[k_Integer]:=If[EvenQ[k],Times@@Table[Max[1,Prime[i]*Boole[Divisible[k,Prime[i]-1]]],{i,1,PrimePi[2k]}],1+KroneckerDelta[k,1]]; (* Enrique Pérez Herrero, Jul 15 2010 *)
    a[0] = 1; a[1] = 2; a[n_?OddQ] = 1; a[n_] := Times @@ Select[Divisors[n] + 1, PrimeQ]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 12 2012, after Ilan Vardi, when direct computation for large n is unfeasible *)
  • PARI
    a(n)=if(n<0, 0, denominator(bernfrac(n)))
    
  • PARI
    a(n) = if(n == 0 || (n > 1 && n % 2), 1, vecprod(select(x -> isprime(x), apply(x -> x + 1, divisors(n))))); \\ Amiram Eldar, Apr 24 2024
    
  • Python
    from sympy import bernoulli
    [bernoulli(i).denominator for i in range(51)] # Indranil Ghosh, Mar 18 2017
  • Sage
    def A027642_list(len):
        f, R, C = 1, [1], [1]+[0]*(len-1)
        for n in (1..len-1):
            f *= n
            for k in range(n, 0, -1):
                C[k] = C[k-1] / (k+1)
            C[0] = -sum(C[k] for k in (1..n))
            R.append((C[0]*f).denominator())
        return R
    A027642_list(62) # Peter Luschny, Feb 20 2016
    

Formula

E.g.f: x/(exp(x) - 1); take denominators.
Let E(x) be the e.g.f., then E(x) = U(0), where U(k) = 2*k + 1 - x*(2*k+1)/(x + (2*k+2)/(1 + x/U(k+1))); (continued fraction, 3-step). - Sergei N. Gladkovskii, Jun 25 2012
E.g.f.: x/(exp(x)-1) = E(0) where E(k) = 2*k+1 - x/(2 + x/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 16 2013
E.g.f.: x/(exp(x)-1) = 2*E(0) - 2*x, where E(k)= x + (k+1)/(1 + 1/(1 - x/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 10 2013
E.g.f.: x/(exp(x)-1) = (1-x)/E(0), where E(k) = 1 - x*(k+1)/(x*(k+1) + (k+2-x)*(k+1-x)/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 21 2013
E.g.f.: conjecture: x/(exp(x)-1) = T(0)/2 - x, where T(k) = 8*k+2 + x/( 1 - x/( 8*k+6 + x/( 1 - x/T(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Nov 24 2013
a(2*n) = 2*A001897(n) = A002445(n) = 3*A277087(n) for n >= 1. Jonathan Sondow, Dec 14 2016

A002445 Denominators of Bernoulli numbers B_{2n}.

Original entry on oeis.org

1, 6, 30, 42, 30, 66, 2730, 6, 510, 798, 330, 138, 2730, 6, 870, 14322, 510, 6, 1919190, 6, 13530, 1806, 690, 282, 46410, 66, 1590, 798, 870, 354, 56786730, 6, 510, 64722, 30, 4686, 140100870, 6, 30, 3318, 230010, 498, 3404310, 6, 61410, 272118, 1410, 6, 4501770, 6, 33330, 4326, 1590, 642, 209191710, 1518, 1671270, 42
Offset: 0

Views

Author

Keywords

Comments

From the von Staudt-Clausen theorem, denominator(B_2n) = product of primes p such that (p-1)|2n.
Row products of A138239. - Mats Granvik, Mar 08 2008
Equals row products of even rows in triangle A143343. In triangle A080092, row products = denominators of B1, B2, B4, B6, ... . - Gary W. Adamson, Aug 09 2008
Julius Worpitzky's 1883 algorithm for generating Bernoulli numbers is shown in A028246. - Gary W. Adamson, Aug 09 2008
There is a relation between the Euler numbers E_n and the Bernoulli numbers B_{2*n}, for n>0, namely, B_{2*n} = A000367(n)/a(n) = ((-1)^n/(2*(1-2^{2*n}))) * Sum_{k = 0..n-1} (-1)^k*2^{2*k}*C(2*n,2*k)*A000364(n-k)*A000367(k)/a(k). (See Bucur, et al.) - L. Edson Jeffery, Sep 17 2012
a(n) is the product of all primes of the form (k + n)/(k - n). - Thomas Ordowski, Jul 24 2025

Examples

			B_{2n} = [ 1, 1/6, -1/30, 1/42, -1/30, 5/66, -691/2730, 7/6, -3617/510, ... ].
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 932.
  • J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 136.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • See A000367 for further references and links (there are a lot).

Crossrefs

Cf. A090801 (distinct numbers appearing as denominators of Bernoulli numbers)
B_n gives A027641/A027642. See A027641 for full list of references, links, formulas, etc.
Cf. A160014 for a generalization.

Programs

  • Magma
    [Denominator(Bernoulli(2*n)): n in [0..60]]; // Vincenzo Librandi, Nov 16 2014
    
  • Maple
    A002445 := n -> mul(i,i=select(isprime,map(i->i+1,numtheory[divisors] (2*n)))): seq(A002445(n),n=0..40); # Peter Luschny, Aug 09 2011
    # Alternative
    N:= 1000: # to get a(0) to a(N)
    A:= Vector(N,2):
    for p in select(isprime,[seq(2*i+1,i=1..N)]) do
      r:= (p-1)/2;
      for n from r to N by r do
        A[n]:= A[n]*p
      od
    od:
    1, seq(A[n],n=1..N); # Robert Israel, Nov 16 2014
  • Mathematica
    Take[Denominator[BernoulliB[Range[0,100]]],{1,-1,2}] (* Harvey P. Dale, Oct 17 2011 *)
  • PARI
    a(n)=prod(p=2,2*n+1,if(isprime(p),if((2*n)%(p-1),1,p),1)) \\ Benoit Cloitre
    
  • PARI
    A002445(n,P=1)=forprime(p=2,1+n*=2,n%(p-1)||P*=p);P \\ M. F. Hasler, Jan 05 2016
    
  • PARI
    a(n) = denominator(bernfrac(2*n)); \\ Michel Marcus, Jul 16 2021
    
  • Sage
    def A002445(n):
        if n == 0:
            return 1
        M = (i + 1 for i in divisors(2 * n))
        return prod(s for s in M if is_prime(s))
    [A002445(n) for n in (0..57)] # Peter Luschny, Feb 20 2016

Formula

E.g.f: x/(exp(x) - 1); take denominators of even powers.
B_{2n}/(2n)! = 2*(-1)^(n-1)*(2*Pi)^(-2n) Sum_{k=1..inf} 1/k^(2n) (gives asymptotics) - Rademacher, p. 16, Eq. (9.1). In particular, B_{2*n} ~ (-1)^(n-1)*2*(2*n)!/ (2*Pi)^(2*n).
If n>=3 is prime,then a((n+1)/2)==(-1)^((n-1)/2)*12*|A000367((n+1)/2)|(mod n). - Vladimir Shevelev, Sep 04 2010
a(n) = denominator(-I*(2*n)!/(Pi*(1-2*n))*integral(log(1-1/t)^(1-2*n) dt, t=0..1)). - Gerry Martens, May 17 2011
a(n) = 2*denominator((2*n)!*Li_{2*n}(1)) for n > 0. - Peter Luschny, Jun 28 2012
a(n) = gcd(2!S(2n+1,2),...,(2n+1)!S(2n+1,2n+1)). Here S(n,k) is the Stirling number of the second kind. See the paper of Komatsu et al. - Istvan Mezo, May 12 2016
a(n) = 2*A001897(n) = A027642(2*n) = 3*A277087(n) for n>0. - Jonathan Sondow, Dec 14 2016

A143343 Triangle T(n,k) (n>=0, 1<=k<=n+1) read by rows: T(n,1)=1 for n>=0, T(1,2)=2. If n>=3 is odd then T(n,k)=1 for all k. If n>=3 is even then if k is prime and k-1 divides n then T(n,k)=k, otherwise T(n,k)=1.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 1, 1, 1, 1, 2, 3, 1, 5, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 5, 1, 7, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Gary W. Adamson & Mats Granvik, Aug 09 2008

Keywords

Comments

By the von Stadt-Clausen theorem, the product of the terms in row n is the denominator of the Bernoulli number B_n.

Examples

			The triangle begins:
1,
1,2,
1,2,3,
1,1,1,1,
1,2,3,1,5,
1,1,1,1,1,1,
1,2,3,1,1,1,7,
1,1,1,1,1,1,1,1,
1,2,3,1,5,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,2,3,1,1,1,1,1,1,1,11,
1,1,1,1,1,1,1,1,1,1,1,1,
1,2,3,1,5,1,7,1,1,1,1,1,13,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
...
		

References

  • H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.

Crossrefs

Extensions

Entry revised by N. J. A. Sloane, Aug 10 2019

A165908 Irregular triangle with the terms in the Staudt-Clausen theorem for the nonzero Bernoulli numbers multiplied by the product of the associated primes.

Original entry on oeis.org

1, 2, -1, 6, -3, -2, 30, -15, -10, -6, 42, -21, -14, -6, 30, -15, -10, -6, 66, -33, -22, -6, 2730, -1365, -910, -546, -390, -210, 12, -3, -2, -3060, -255, -170, -102, -30, 44688, -399, -266, -114, -42
Offset: 0

Views

Author

Paul Curtz, Sep 30 2009

Keywords

Comments

The decomposition of a nonzero Bernoulli number in the Staudt-Clausen format is B(n) = A000146(n) - sum_k 1/A080092(n,k) with a set of primes A080092 characterizing the right hand side.
If we multiply this equation by the product of the primes for a given n (which is in A002445), discard the left hand side, and list individually the terms associated with A000146 and each of the k, we get row n of the current triangle .

Examples

			The decomposition of B_10 is 5/66 = 1-1/2-1/3-1/11. Multiplied by the product 2*3*11=66 of the denominators this becomes 5=66-33-22-6, and the 4 terms on the right hand side become one row of the table.
1;
2,-1;
6,-3,-2;
30,-15,-10,-6;
42,-21,-14,-6;
30,-15,-10,-6;
66,-33,-22,-6;
2730,-1365,-910,-546,-390,-210;
		

Crossrefs

Cf. A000146, A165884, A006954 (first column).

Programs

  • Maple
    A165908 := proc(n) local i,p; Ld := [] ; pp := 1 ; for i from 1 do p := ithprime(i) ; if (2*n) mod (p-1) = 0 then Ld := [op(Ld),-1/p] ; pp := pp*p ; elif p-1 > 2*n then break; end if; end do: Ld := [A000146(n),op(Ld)] ; [seq(op(i,Ld)*pp,i=1..nops(Ld))] ; end proc: # for n>=2, R. J. Mathar, Jul 08 2011
  • Mathematica
    a146[n_] := Sum[ Boole[ PrimeQ[d+1]]/(d+1), {d, Divisors[2n]}] + BernoulliB[2n]; primes[n_] := Select[ Prime /@ Range[n+1], Divisible[2n, #-1]& ]; row[n_] := With[{pp = primes[n]}, Join[{a146[n]}, -1/pp]*Times @@ pp]; Join[{1}, Flatten[ Table[row[n], {n, 0, 9}]]] (* Jean-François Alcover_, Aug 09 2012 *)

Extensions

Edited by R. J. Mathar, Jul 08 2011

A166306 Denominator of Bernoulli_n multiplied by the sum of the associated inverse primes in the Staudt-Clausen theorem, n=1, 2, 4, 6, 8, 10,...

Original entry on oeis.org

1, 5, 31, 41, 31, 61, 3421, 5, 557, 821, 371, 121, 3421, 5, 929, 15745, 557, 5, 2557843, 5, 15541, 1805, 743, 241, 60887, 61, 1673, 821, 929, 301, 79085411, 5, 557, 66961, 31, 4397, 188641729, 5, 31, 3281, 277727, 421, 4462547, 5, 66817, 313477, 1487, 5, 5952449, 5
Offset: 1

Views

Author

Paul Curtz, Oct 11 2009

Keywords

Comments

This is the absolute value of the sum of the negative terms in row n of triangle A165908.
It appears that a(n) mod 9 is always one of {1, 2, 4, 5, 7, 8}.
Apparently a(n) = A027761(n+1) for n>=1. - Joerg Arndt, May 06 2012

Examples

			The primes associated with B_10 = 5/66 are 2, 3 and 11. 66*(1/2+1/3+1/11) = 33+22+6 = 61 is the representative in this sequence.
		

Crossrefs

Programs

  • Mathematica
    a146[n_] := Sum[ Boole[ PrimeQ[d+1]]/(d+1), {d, Divisors[2n]}] + BernoulliB[2n]; primes[n_] := Select[ Prime /@ Range[n+1], Divisible[2n, #-1]&]; row[n_] := With[{pp = primes[n]}, Join[{a146[n]}, -1/pp]*Times @@ pp]; a[n_] := -Total[ Select[ row[n-1] // Rest, Negative]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Aug 09 2012 *)

Extensions

Edited and extended by R. J. Mathar, Jul 08 2011
Extended to 50 terms by Jean-François Alcover, Aug 09 2012

A214867 Quotients of (first) primorial numbers and denominators of Bernoulli numbers B 0, B 1, B 2, B 4, B 6,... .

Original entry on oeis.org

1, 1, 1, 1, 5, 77, 455, 187, 1616615, 437437, 8107385, 607759061, 53773464745, 111446982977, 2180460221945005, 706769865044243, 2275461421392965, 3770118333635711057, 19548063559901161830545, 4094603218587147211, 92990138354449826827902565
Offset: 0

Views

Author

Paul Curtz, Mar 10 2013

Keywords

Comments

a(2*n+4) is divisible by 5 (because A006954(n+2)=6,30,42,30,... is divisible by A165734(n)=period of length 2: repeat 6,30).

Examples

			a(0) = 1/1, a(1)= 2/2, a(2) = 6/6, a(3) = 30/30, a(4) =210/42=5.
By product (see A080092):
1,
1,
1,
1,
5,
7  * 11,
5  *  7 *13,
11 * 17,
5  *  7 *11 *13 *17 *19,
7  * 11 *13 *19 *23,
5  * 11 *13 *17 *23 *29,
7  * 13 *17 *19 *23 *29 *31,
5  *  7 *11 *13 *17 *19 *29 *31 *37.
		

Programs

  • Mathematica
    a[n_] := Product[ Prime[k], {k,1, n}] / Denominator[ BernoulliB[2*n-2] ]; a[0] = a[1] = 1; Table[a[n],{n,0,20}] (* Jean-François Alcover, Mar 15 2013 *)

Formula

a(n) = A002110(n)/A006954(n).

Extensions

More terms from Jean-François Alcover, Mar 15 2013
Showing 1-7 of 7 results.