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-10 of 10 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

A027641 Numerator of Bernoulli number B_n.

Original entry on oeis.org

1, -1, 1, 0, -1, 0, 1, 0, -1, 0, 5, 0, -691, 0, 7, 0, -3617, 0, 43867, 0, -174611, 0, 854513, 0, -236364091, 0, 8553103, 0, -23749461029, 0, 8615841276005, 0, -7709321041217, 0, 2577687858367, 0, -26315271553053477373, 0, 2929993913841559, 0, -261082718496449122051
Offset: 0

Views

Author

Keywords

Comments

a(n)/A027642(n) (Bernoulli numbers) provide the a-sequence for the Sheffer matrix A094816 (coefficients of orthogonal Poisson-Charlier polynomials). See the W. Lang link under A006232 for a- and z-sequences for Sheffer matrices. The corresponding z-sequence is given by the rationals A130189(n)/A130190(n).
Harvey (2008) describes a new algorithm for computing Bernoulli numbers. His method is to compute B(k) modulo p for many small primes p and then reconstruct B(k) via the Chinese Remainder Theorem. The time complexity is O(k^2 log(k)^(2+eps)). The algorithm is especially well-suited to parallelization. - Jonathan Vos Post, Jul 09 2008
Regard the Bernoulli numbers as forming a vector = B_n, and the variant starting (1, 1/2, 1/6, 0, -1/30, ...), (i.e., the first 1/2 has sign +) as forming a vector Bv_n. The relationship between the Pascal triangle matrix, B_n, and Bv_n is as follows: The binomial transform of B_n = Bv_n. B_n is unchanged when multiplied by the Pascal matrix with rows signed (+-+-, ...), i.e., (1; -1,-1; 1,2,1; ...). Bv_n is unchanged when multiplied by the Pascal matrix with columns signed (+-+-, ...), i.e., (1; 1,-1; 1,-2,1; 1,-3,3,-1; ...). - Gary W. Adamson, Jun 29 2012
The sequence of the Bernoulli numbers B_n = a(n)/A027642(n) is the inverse binomial transform of the sequence {A164555(n)/A027642(n)}, illustrated by the fact that they appear as top row and left column in A190339. - Paul Curtz, May 13 2016
Named by de Moivre (1773; "the numbers of Mr. James Bernoulli") after the Swiss mathematician Jacob Bernoulli (1655-1705). - Amiram Eldar, Oct 02 2023

Examples

			B_n sequence 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, ...
		

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.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • Harold 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.
  • Harold M. Edwards, Riemann's Zeta Function, Academic Press, NY, 1974; see p. 11.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.6.1.
  • Herman H. Goldstine, A History of Numerical Analysis, Springer-Verlag, 1977; Section 2.6.
  • L. M. Milne-Thompson, Calculus of Finite Differences, 1951, p. 137.
  • Hans Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.

Crossrefs

This is the main entry for the Bernoulli numbers and has all the references, links and formulas. Sequences A027642 (the denominators of B_n) and A000367/A002445 = B_{2n} are also important!
A refinement is A194587.

Programs

  • Magma
    [Numerator(Bernoulli(n)): n in [0..40]]; // Vincenzo Librandi, Mar 17 2014
    
  • Maple
    B := n -> add((-1)^m*m!*Stirling2(n, m)/(m+1), m=0..n);
    B := n -> bernoulli(n);
    seq(numer(bernoulli(n)), n=0..40); # Zerinvary Lajos, Apr 08 2009
  • Mathematica
    Table[ Numerator[ BernoulliB[ n]], {n, 0, 40}] (* Robert G. Wilson v, Oct 11 2004 *)
    Numerator[ Range[0, 40]! CoefficientList[ Series[x/(E^x - 1), {x, 0, 40}], x]]
    Numerator[CoefficientList[Series[PolyGamma[1, 1/x]/x - x, {x, 0, 40}, Assumptions -> x > 0], x]] (* Vladimir Reshetnikov, Apr 24 2013 *)
  • Maxima
    B(n):=(-1)^((n))*sum((stirling1(n,k)*stirling2(n+k,n))/binomial(n+k,k),k,0,n);
    makelist(num(B(n)),n,0,20); /* Vladimir Kruchinin, Mar 16 2013 */
    
  • PARI
    a(n)=numerator(bernfrac(n))
    
  • Python
    from sympy import bernoulli
    from fractions import Fraction
    [bernoulli(i).as_numer_denom()[0] for i in range(51)]  # Indranil Ghosh, Mar 18 2017
    
  • Python
    from sympy import bernoulli
    def A027641(n): return bernoulli(n).p
    print([A027641(n) for n in range(80)])  # M. F. Hasler, Jun 11 2019
  • SageMath
    [bernoulli(n).numerator() for n in range(41)]  # Peter Luschny, Feb 19 2016
    
  • SageMath
    # Alternatively:
    def A027641_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).numerator())
        return R
    A027641_list(41)  # Peter Luschny, Feb 20 2016
    

Formula

E.g.f: x/(exp(x) - 1); take numerators.
Recurrence: B^n = (1+B)^n, n >= 2 (interpreting B^j as B_j).
B_{2n}/(2n)! = 2*(-1)^(n-1)*(2*Pi)^(-2n) Sum_{k>=1} 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).
Sum_{i=1..n-1} i^k = ((n+B)^(k+1)-B^(k+1))/(k+1) (interpreting B^j as B_j).
B_{n-1} = - Sum_{r=1..n} (-1)^r binomial(n, r) r^(-1) Sum_{k=1..r} k^(n-1). More concisely, B_n = 1 - (1-C)^(n+1), where C^r is replaced by the arithmetic mean of the first r n-th powers of natural numbers in the expansion of the right-hand side. [Bergmann]
Sum_{i>=1} 1/i^(2k) = zeta(2k) = (2*Pi)^(2k)*|B_{2k}|/(2*(2k)!).
B_{2n} = (-1)^(m-1)/2^(2m+1) * Integral{-inf..inf, [d^(m-1)/dx^(m-1) sech(x)^2 ]^2 dx} (see Grosset/Veselov).
Let B(s,z) = -2^(1-s)(i/Pi)^s s! PolyLog(s,exp(-2*i*Pi/z)). Then B(2n,1) = B_{2n} for n >= 1. Similarly the numbers B(2n+1,1), which might be called Co-Bernoulli numbers, can be considered, and it is remarkable that Leonhard Euler in 1755 already calculated B(3,1) and B(5,1) (Opera Omnia, Ser. 1, Vol. 10, p. 351). (Cf. the Luschny reference for a discussion.) - Peter Luschny, May 02 2009
The B_n sequence is the left column of the inverse of triangle A074909, the "beheaded" Pascal's triangle. - Gary W. Adamson, Mar 05 2012
From Sergei N. Gladkovskii, Dec 04 2012: (Start)
E.g.f. E(x)= 2 - x/(tan(x) + sec(x) - 1)= Sum_{n>=0} a(n)*x^n/n!, a(n)=|B(n)|, where B(n) is Bernoulli number B_n.
E(x)= 2 + x - B(0), where B(k)= 4*k+1 + x/(2 + x/(4*k+3 - x/(2 - x/B(k+1)))); (continued fraction, 4-step). (End)
E.g.f.: x/(exp(x)-1)= U(0); U(k)= 2*k+1 - x(2*k+1)/(x + (2*k+2)/(1 + x/U(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 05 2012
E.g.f.: 2*(x-1)/(x*Q(0)-2) where Q(k) = 1 + 2*x*(k+1)/((2*k+1)*(2*k+3) - x*(2*k+1)*(2*k+3)^2/(x*(2*k+3) + 4*(k+1)*(k+2)/Q(k+1))); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 26 2013
a(n) = numerator(B(n)), B(n) = (-1)^n*Sum_{k=0..n} Stirling1(n,k) * Stirling2(n+k,n) / binomial(n+k,k). - Vladimir Kruchinin, Mar 16 2013
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
G.f. for Bernoulli(n) = a(n)/A027642(n): psi_1(1/x)/x - x, where psi_n(z) is the polygamma function, psi_n(z) = (d/dz)^(n+1) log(Gamma(z)). - Vladimir Reshetnikov, Apr 24 2013
E.g.f.: 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
B_n = Sum_{m=0..n} (-1)^m *A131689(n, m)/(m + 1), n >= 0. See one of the Maple programs. - Wolfdieter Lang, May 05 2017
a(n) = numerator((-1)^n*A155585(n-1)*n/(4^n-2^n)), for n>=1. - Mats Granvik, Nov 26 2017
From Artur Jasinski, Dec 30 2020: (Start)
a(n) = numerator(-2*cos(Pi*n/2)*Gamma(n+1)*zeta(n)/(2*Pi)^n), for n=0 and n>1.
a(n) = numerator(-n*zeta(1-n)), for n=0 and n>1. (End)
a(n) = numerator(Sum_{k=0..n-1} (-1)^(k-1)*k!*Stirling2(n-1,k) / ((k+1)*(k+2))), for n>0 (see Jha link). - Bill McEachen, Jul 17 2025

A000367 Numerators of Bernoulli numbers B_2n.

Original entry on oeis.org

1, 1, -1, 1, -1, 5, -691, 7, -3617, 43867, -174611, 854513, -236364091, 8553103, -23749461029, 8615841276005, -7709321041217, 2577687858367, -26315271553053477373, 2929993913841559, -261082718496449122051
Offset: 0

Views

Author

Keywords

Examples

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

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.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 932.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • 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.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • H. H. Goldstine, A History of Numerical Analysis, Springer-Verlag, 1977; Section 2.6.
  • F. Lemmermeyer, Reciprocity Laws From Euler to Eisenstein, Springer-Verlag, 2000, p. 330.
  • H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.
  • 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).

Crossrefs

B_n gives A027641/A027642. See A027641 for full list of references, links, formulas, etc.
See A002445 for denominators.

Programs

  • Maple
    A000367 := n -> numer(bernoulli(2*n)):
    # Illustrating an algorithmic approach:
    S := proc(n,k) option remember; if k=0 then `if`(n=0,1,0) else S(n, k-1) + S(n-1, n-k) fi end: Bernoulli2n := n -> `if`(n = 0,1,(-1)^n * S(2*n-1,2*n-1)*n/(2^(2*n-1)*(1-4^n))); A000367 := n -> numer(Bernoulli2n(n)); seq(A000367(n),n=0..20); # Peter Luschny, Jul 08 2012
  • Mathematica
    Numerator[ BernoulliB[ 2*Range[0, 20]]] (* Jean-François Alcover, Oct 16 2012 *)
    Table[Numerator[(-1)^(n+1) 2 Gamma[2 n + 1] Zeta[2 n]/(2 Pi)^(2 n)], {n, 0, 20}] (* Artur Jasinski, Dec 29 2020 *)
  • Maxima
    B(n):=if n=0 then 1 else 2*n*sum((2*n+k-2)!*sum(((-1)^(j+1)*stirling1(2*n+j,j))/ ((k-j)!*(2*n+j)!),j,1,k),k,0,2*n);
    makelist(num(B(n)),n,0,10); /* Vladimir Kruchinin, Mar 15 2013, fixed by Vaclav Kotesovec, Oct 22 2014 */
  • PARI
    a(n)=numerator(bernfrac(2*n))
    
  • Python
    # The objective of this implementation is efficiency.
    # n -> [a(0), a(1), ..., a(n)] for n > 0.
    from fractions import Fraction
    def A000367_list(n):  # Bernoulli numerators
        T = [0 for i in range(1, n+2)]
        T[0] = 1; T[1] = 1
        for k in range(2, n+1):
            T[k] = (k-1)*T[k-1]
        for k in range(2, n+1):
            for j in range(k, n+1):
                T[j] = (j-k)*T[j-1]+(j-k+2)*T[j]
        a = 0; b = 6; s = 1
        for k in range(1, n+1):
            T[k] = s*Fraction(T[k]*k, b).numerator
            h = b; b = 20*b - 64*a; a = h; s = -s
        return T
    print(A000367_list(100)) # Peter Luschny, Aug 09 2011
    

Formula

E.g.f: x/(exp(x) - 1); take numerators of even powers.
B_{2n}/(2n)! = 2*(-1)^(n-1)*(2*Pi)^(-2n) Sum_{k>=1} 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 12*|a((n+1)/2)| == (-1)^((n-1)/2)*A002445((n+1)/2) (mod n). - Vladimir Shevelev, Sep 04 2010
a(n) = numerator(-i*(2*n)!/(Pi*(1-2*n))*Integral_{t=0..1} log(1-1/t)^(1-2*n) dt). - Gerry Martens, May 17 2011, corrected by Vaclav Kotesovec, Oct 22 2014
a(n) = numerator((-1)^(n+1)*(2*Pi)^(-2*n)*(2*n)!*Li_{2*n}(1)) for n > 0. - Peter Luschny, Jun 29 2012
E.g.f.: G(0) where G(k) = 2*k + 1 - x*(2*k+1)/(x + (2*k+2)/(1 + x/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Feb 13 2013
a(n) = numerator(2*n*Sum_{k=0..2*n} (2*n+k-2)! * Sum_{j=1..k} ((-1)^(j+1) * Stirling1(2*n+j,j)) / ((k-j)!*(2*n+j)!)), n > 0. - Vladimir Kruchinin, Mar 15 2013
E.g.f.: 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.: E(0) - x, where E(k) = x + k + 1 - x*(k+1)/E(k+1); (continued fraction). - Sergei N. Gladkovskii, Jul 14 2013
a(n) = numerator((-1)^(n+1)*2*Gamma(2*n + 1)*zeta(2*n)/(2*Pi)^(2*n)). - Artur Jasinski, Dec 29 2020
a(n) = numerator(-2*n*zeta(1 - 2*n)) for n > 0. - Artur Jasinski, Jan 01 2021

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

A127187 Nearest integer to (n+1)*Bernoulli(n).

Original entry on oeis.org

1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 18, 0, -121, 0, 1044, 0, -11112, 0, 142419, 0, -2164506, 0, 38488964, 0, -791648701, 0, 18649007091, 0, -498838420314, 0, 15036512507141, 0, -507331242588268, 0, 19044960439970134, 0
Offset: 0

Views

Author

N. J. A. Sloane, Mar 26 2007

Keywords

Crossrefs

A000146 From von Staudt-Clausen representation of Bernoulli numbers: a(n) = Bernoulli(2n) + Sum_{(p-1)|2n} 1/p.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, -6, 56, -528, 6193, -86579, 1425518, -27298230, 601580875, -15116315766, 429614643062, -13711655205087, 488332318973594, -19296579341940067, 841693047573682616, -40338071854059455412, 2115074863808199160561, -120866265222965259346026
Offset: 1

Views

Author

Keywords

Comments

The von Staudt-Clausen theorem states that this number is always an integer.

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Th. 118.
  • Max Koecher, Klassische elementare Analysis, Birkhäuser, Basel, Boston, 1987, pp. 168-170.
  • H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Section 5.
  • 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).

Crossrefs

Programs

  • Maple
    A000146 := proc(n) local a ,i,p; a := bernoulli(2*n) ;for i from 1 do p := ithprime(i) ; if (2*n) mod (p-1) = 0 then a := a+1/p ; elif p-1 > 2*n then break; end if; end do: a ; end proc: # R. J. Mathar, Jul 08 2011
  • Mathematica
    Table[ BernoulliB[2 n] + Total[ 1/Select[ Prime /@ Range[n+1], Divisible[2n, #-1] &]], {n, 1, 22}] (* Jean-François Alcover, Oct 12 2011 *)
  • PARI
    a(n)=if(n<1,0,sumdiv(2*n,d, isprime(d+1)/(d+1))+bernfrac(2*n))
    
  • Python
    from fractions import Fraction
    from sympy import bernoulli, divisors, isprime
    def A000146(n): return int(bernoulli(m:=n<<1)+sum(Fraction(1,d+1) for d in divisors(m,generator=True) if isprime(d+1))) # Chai Wah Wu, Apr 14 2023

Extensions

Signs courtesy of Antreas P. Hatzipolakis (xpolakis(AT)hol.gr)
More terms from Michael Somos

A050925 Numerator of (n+1)*Bernoulli(n).

Original entry on oeis.org

1, -1, 1, 0, -1, 0, 1, 0, -3, 0, 5, 0, -691, 0, 35, 0, -3617, 0, 43867, 0, -1222277, 0, 854513, 0, -1181820455, 0, 76977927, 0, -23749461029, 0, 8615841276005, 0, -84802531453387, 0, 90219075042845, 0, -26315271553053477373, 0, 38089920879940267, 0
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 1999

Keywords

Comments

The denominators are in A050932. The e.g.f. for (n+1)*Bernoulli(n), n >= 0, is (d/dx)(x^2/(exp(x)-1)) = x*(2*(exp(x)-1)- x*exp(x))/(exp(x)-1)^2. - Wolfdieter Lang, Jul 15 2013
It can be observed that the rational sequence [0, 1, 1, 1/2, 0, -1/6, 0, 1/6, 0, -3/10, 0, 5/6, ...], derived from a(n)/A050932(n), is an autosequence of the first kind. - Jean-François Alcover, Jul 21 2017
Apparently a(n) = numerator(Sum_{k=0..n-1} (-1)^(n-k+1)*E1(n,k+1)/binomial(n,k+1)) for n >= 2, where E1(n, k) denotes the first-order Eulerian numbers A123125. - Peter Luschny, Feb 17 2021

Crossrefs

Programs

  • Haskell
    a050925 n = a050925_list !! n
    a050925_list = 1 : -1 : (tail $ map (numerator . sum) $
       zipWith (zipWith (%))
       (zipWith (map . (*)) (drop 2 a000142_list) a242179_tabf) a106831_tabf)
    -- Reinhard Zumkeller, Jul 04 2014
    
  • Mathematica
    Numerator[Table[(n+1)BernoulliB[n],{n,0,40}]] (* Harvey P. Dale, May 13 2012 *)
  • PARI
    a(n)=numerator(bernfrac(n)*(n+1)) \\ Charles R Greathouse IV, Feb 07 2017

A050932 Denominator of (n+1)*Bernoulli(n).

Original entry on oeis.org

1, 1, 2, 1, 6, 1, 6, 1, 10, 1, 6, 1, 210, 1, 2, 1, 30, 1, 42, 1, 110, 1, 6, 1, 546, 1, 2, 1, 30, 1, 462, 1, 170, 1, 6, 1, 51870, 1, 2, 1, 330, 1, 42, 1, 46, 1, 6, 1, 6630, 1, 22, 1, 30, 1, 798, 1, 290, 1, 6, 1, 930930, 1, 2, 1, 102, 1, 966, 1, 10, 1, 66, 1, 1919190
Offset: 0

Views

Author

N. J. A. Sloane, Dec 30 1999

Keywords

Comments

Apparently a(n) = denominator(Sum_{k=0..n-1} (-1)^(n-k+1)*E1(n, k+1)/binomial(n, k+1)), where E1(n, k) denotes the first-order Eulerian numbers A123125. - Peter Luschny, Feb 17 2021

Crossrefs

Programs

  • Haskell
    a050932 n = a050932_list !! n
    a050932_list = 1 : map (denominator . sum) (zipWith (zipWith (%))
       (zipWith (map . (*)) (drop 2 a000142_list) a242179_tabf) a106831_tabf)
    -- Reinhard Zumkeller, Jul 04 2014
    
  • Mathematica
    Denominator/@Table[(n+1)BernoulliB[n],{n,0,80}] (* Harvey P. Dale, May 19 2011 *)
  • PARI
    a(n)=denominator(bernfrac(n)*(n+1)) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from sympy import bernoulli, gcd
    def A050932(n):
        q = bernoulli(n).q
        return q//gcd(q,n+1) # Chai Wah Wu, Apr 02 2021

A302971 Triangle read by rows: T(n,k) is the numerator of R(n,k) defined implicitly by the identity Sum_{i=0..l-1} Sum_{j=0..m} R(m,j)*(l-i)^j*i^j = l^(2*m+1) holding for all l,m >= 0.

Original entry on oeis.org

1, 1, 6, 1, 0, 30, 1, -14, 0, 140, 1, -120, 0, 0, 630, 1, -1386, 660, 0, 0, 2772, 1, -21840, 18018, 0, 0, 0, 12012, 1, -450054, 491400, -60060, 0, 0, 0, 51480, 1, -11880960, 15506040, -3712800, 0, 0, 0, 0, 218790, 1, -394788954, 581981400, -196409840, 8817900, 0, 0, 0, 0, 923780, 1, -16172552880, 26003271294, -10863652800, 1031151660, 0, 0, 0, 0, 0, 3879876
Offset: 0

Views

Author

Kolosov Petro, Apr 16 2018

Keywords

Examples

			Triangle begins:
------------------------------------------------------------------------
k=   0          1         2         3    4     5      6      7       8
------------------------------------------------------------------------
n=0: 1;
n=1: 1,         6;
n=2: 1,         0,       30;
n=3: 1,       -14,        0,      140;
n=4: 1,      -120,        0,        0, 630;
n=5: 1,     -1386,      660,        0,   0, 2772;
n=6: 1,    -21840,    18018,        0,   0,    0, 12012;
n=7: 1,   -450054,   491400,   -60060,   0,    0,     0, 51480;
n=8: 1, -11880960, 15506040, -3712800,   0,    0,     0,     0, 218790;
		

Crossrefs

Items of second row are the coefficients in the definition of A287326.
Items of third row are the coefficients in the definition of A300656.
Items of fourth row are the coefficients in the definition of A300785.
T(n,n) gives A002457(n).
Denominators of R(n,k) are shown in A304042.
Row sums return A000079(2n+1) - 1.

Programs

  • Maple
    R := proc(n, k) if k < 0 or k > n then return 0 fi; (2*k+1)*binomial(2*k, k);
    if n = k then % else -%*add((-1)^j*R(n, j)*binomial(j, 2*k+1)*
    bernoulli(2*j-2*k)/(j-k), j=2*k+1..n) fi end: T := (n, k) -> numer(R(n, k)):
    seq(print(seq(T(n, k), k=0..n)), n=0..12);
    # Numerical check that S(m, n) = n^(2*m+1):
    S := (m, n) -> add(add(R(m, j)*(n-k)^j*k^j, j=0..m), k=0..n-1):
    seq(seq(S(m, n) - n^(2*m+1), n=0..12), m=0..12); # Peter Luschny, Apr 30 2018
  • Mathematica
    R[n_, k_] := 0
    R[n_, k_] := (2 k + 1)*Binomial[2 k, k]*
       Sum[R[n, j]*Binomial[j, 2 k + 1]*(-1)^(j - 1)/(j - k)*
       BernoulliB[2 j - 2 k], {j, 2 k + 1, n}] /; 2 k + 1 <= n
    R[n_, k_] := (2 n + 1)*Binomial[2 n, n] /; k == n;
    T[n_, k_] := Numerator[R[n, k]];
    (* Print Fifteen Initial rows of Triangle A302971 *)
    Column[ Table[ T[n, k], {n, 0, 15}, {k, 0, n}], Center]
  • PARI
    T(n, k) = if ((n>k) || (n<0), 0, if (k==n, (2*n+1)*binomial(2*n, n), if (2*n+1>k, 0, if (n==0, 1, (2*n+1)*binomial(2*n, n)*sum(j=2*n+1, k+1, T(j, k)*binomial(j, 2*n+1)*(-1)^(j-1)/(j-n)*bernfrac(2*j-2*n))))));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(numerator(T(k,n)), ", ")); print); \\ Michel Marcus, Apr 27 2018

Formula

Recurrence given by Max Alekseyev (see the MathOverflow link):
R(n, k) = 0 if k < 0 or k > n.
R(n, k) = (2k+1)*binomial(2k, k) if k = n.
R(n, k) = (2k+1)*binomial(2k, k)*Sum_{j=2k+1..n} R(n, j)*binomial(j, 2k+1)*(-1)^(j-1)/(j-k)*Bernoulli(2j-2k), otherwise.
T(n, k) = numerator(R(n, k)).

A304042 Triangle read by rows: T(n,k) is the denominator of R(n,k) defined implicitly by the identity Sum_{i=0..l-1} Sum_{j=0..m} R(m,j)*(l-i)^j*i^j = l^(2*m+1) holding for all l,m >= 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Kolosov Petro, May 05 2018

Keywords

Examples

			Triangle begins:
-----------------------------------------------------
k=    0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
-----------------------------------------------------
n=0:  1;
n=1:  1, 1;
n=2:  1, 1, 1;
n=3:  1, 1, 1, 1;
n=4:  1, 1, 1, 1, 1;
n=5:  1, 1, 1, 1, 1, 1;
n=6:  1, 1, 1, 1, 1, 1, 1;
n=7:  1, 1, 1, 1, 1, 1, 1, 1;
n=8:  1, 1, 1, 1, 1, 1, 1, 1, 1;
n=9:  1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
n=10: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
n=11: 1, 5, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1;
n=12: 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1;
n=13: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
n=14: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
n=15: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Programs

  • Mathematica
    R[n_, k_] := 0
    R[n_, k_] := (2 k + 1)*Binomial[2 k, k]*
       Sum[R[n, j]*Binomial[j, 2 k + 1]*(-1)^(j - 1)/(j - k)*
       BernoulliB[2 j - 2 k], {j, 2 k + 1, n}] /; 2 k + 1 <= n
    R[n_, k_] := (2 n + 1)*Binomial[2 n, n] /; k == n;
    T[n_, k_] := Denominator[R[n, k]];
    (* Print Fifteen Initial rows of Triangle A304042 *)
    Column[ Table[ T[n, k], {n, 0, 15}, {k, 0, n}], Center]
  • PARI
    up_to = 1274; \\ = binomial(50+1,2)-1
    A304042aux(n, k) = if((k<0)||(k>n),0,(k+k+1)*binomial(2*k, k)*if(k==n,1,sum(j=k+k+1,n, A304042aux(n, j)*binomial(j, k+k+1)*((-1)^(j-1))/(j-k)*bernfrac(2*(j-k)))));
    A304042tr(n, k) = denominator(A304042aux(n, k));
    A304042list(up_to) = { my(v = vector(up_to), i=0); for(n=0,oo, for(k=0,n, if(i++ > up_to, return(v)); v[i] = A304042tr(n,k))); (v); };
    v304042 = A304042list(1+up_to);
    A304042(n) = v304042[1+n]; \\ Antti Karttunen, Nov 07 2018

Formula

Recurrence given by Max Alekseyev (see the MathOverflow link):
R(n, k) = 0 if k < 0 or k > n.
R(n, k) = (2k+1)*binomial(2k, k) if k = n.
R(n, k) = (2k+1)*binomial(2k, k)*Sum_{j=2k+1..n} R(n, j)*binomial(j, 2k+1)*(-1)^(j-1)/(j-k)*Bernoulli(2j-2k), otherwise.
T(n, k) = denominator(R(n, k)).
Showing 1-10 of 10 results.