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.

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

A080092 Irregular triangle read by rows, giving prime sequences (p-1|2n) appearing in the n-th von Staudt-Clausen sum.

Original entry on oeis.org

2, 2, 3, 2, 3, 5, 2, 3, 7, 2, 3, 5, 2, 3, 11, 2, 3, 5, 7, 13, 2, 3, 2, 3, 5, 17, 2, 3, 7, 19, 2, 3, 5, 11, 2, 3, 23, 2, 3, 5, 7, 13, 2, 3, 2, 3, 5, 29, 2, 3, 7, 11, 31, 2, 3, 5, 17, 2, 3, 2, 3, 5, 7, 13, 19, 37, 2, 3, 2, 3, 5, 11, 41, 2, 3, 7, 43, 2, 3, 5, 23, 2, 3, 47, 2, 3, 5, 7, 13, 17, 2, 3
Offset: 1

Views

Author

Eric W. Weisstein, Jan 27 2003

Keywords

Comments

From Gary W. Adamson & Mats Granvik, Aug 09 2008: (Start)
The von Staudt-Clausen theorem has two parts: generating denominators of the B_2n and the actual values. Both operations can be demonstrated in triangles A143343 and A080092 by following the procedures outlined in [Wikipedia - Bernoulli numbers] and summarized in A143343.
A046886(n-1) = number of terms in row n.
The same terms in A143343 may be extracted from triangle A138239.
Extract primes from even numbered rows of triangle A143343 but also include "2" as row 1. The rows are thus 1, 2, 4, 6, ..., generating denominators of B_1, B_2, B_4, ..., as well as B_1, B_2, B_4, ..., as two parts of the von Staudt-Clausen theorem.
The denominator of B_12 = 2730 = 2*3*5*7*13 = A027642(12) and A002445(6).
For example, B_12 = -691/2730 = (1 - 1/2 - 1/3 - 1/5 - 1/7 - 1/13).
The second operation is the von Staudt-Clausen representation of Bn, obtained by starting with "1" and then subtracting the reciprocals of terms in each row. (Cf. A143343 for a detailed explanation of the operations.) (End)

Examples

			First few rows of the triangle:
  2;
  2, 3;
  2, 3, 5;
  2, 3, 7;
  2, 3, 5;
  2, 3, 11;
  2, 3, 5, 7, 13;
  2, 3;
  ...
Sum for n=1 is 1/2 + 1/3, so terms are 2, 3;
sum for n=2 is 1/2 + 1/3 + 1/5, so terms are 2, 3, 5; etc.
		

Crossrefs

Programs

  • Mathematica
    row[n_] := Select[ Prime /@ Range[n+1], Divisible[2n, # - 1] &]; Flatten[Table[row[n], {n, 0, 25}]] (* Jean-François Alcover, Oct 12 2011 *)

Extensions

Edited by N. J. A. Sloane, Nov 01 2009 at the suggestion of R. J. Mathar
Showing 1-3 of 3 results.