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.

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