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.

A027641 Numerator of Bernoulli number B_n.

This page as a plain text file.
%I A027641 #273 Jul 27 2025 19:56:31
%S A027641 1,-1,1,0,-1,0,1,0,-1,0,5,0,-691,0,7,0,-3617,0,43867,0,-174611,0,
%T A027641 854513,0,-236364091,0,8553103,0,-23749461029,0,8615841276005,0,
%U A027641 -7709321041217,0,2577687858367,0,-26315271553053477373,0,2929993913841559,0,-261082718496449122051
%N A027641 Numerator of Bernoulli number B_n.
%C A027641 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).
%C A027641 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
%C A027641 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
%C A027641 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
%C A027641 Named by de Moivre (1773; "the numbers of Mr. James Bernoulli") after the Swiss mathematician Jacob Bernoulli (1655-1705). - _Amiram Eldar_, Oct 02 2023
%D A027641 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.
%D A027641 Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
%D A027641 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.
%D A027641 Harold M. Edwards, Riemann's Zeta Function, Academic Press, NY, 1974; see p. 11.
%D A027641 Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.6.1.
%D A027641 Herman H. Goldstine, A History of Numerical Analysis, Springer-Verlag, 1977; Section 2.6.
%D A027641 L. M. Milne-Thompson, Calculus of Finite Differences, 1951, p. 137.
%D A027641 Hans Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.
%H A027641 T. D. Noe, <a href="/A027641/b027641.txt">Table of n, a(n) for n = 0..200</a>
%H A027641 M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
%H A027641 C. M. Bender and K. A. Milton, <a href="http://arxiv.org/abs/hep-th/9304052">Continued fraction as a discrete nonlinear transform</a>, arXiv:hep-th/9304052, 1993.
%H A027641 Beáta Bényi and Péter Hajnal, <a href="https://arxiv.org/abs/1804.01868">Poly-Bernoulli Numbers and Eulerian Numbers</a>, arXiv:1804.01868 [math.CO], 2018.
%H A027641 H. Bergmann, <a href="http://dx.doi.org/10.1002/mana.1967.3210340509">Eine explizite Darstellung der Bernoullischen Zahlen</a>, Math. Nach. 34 (1967), 377-378. Math Rev 36#4030.
%H A027641 Richard P. Brent and David Harvey, <a href="http://arxiv.org/abs/1108.0286">Fast computation of Bernoulli, Tangent and Secant numbers</a>, arXiv preprint arXiv:1108.0286 [math.CO], 2011.
%H A027641 K.-W. Chen, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/CHEN/AlgBE2.html">Algorithms for Bernoulli numbers and Euler numbers</a>, J. Integer Sequences, 4 (2001), #01.1.6.
%H A027641 W. Y.C. Chen, J. J. F. Guo and L. X. W. Wang, <a href="http://arxiv.org/abs/1208.5213">Log-behavior of the Bernoulli Numbers</a>, arXiv:1208.5213 [math.CO], 2012-2013.
%H A027641 Abraham de Moivre, <a href="https://archive.org/details/doctrineofchance00moiv/page/94/mode/2up">The Doctrine of Chances</a>, 3rd edition, London, 1733, p. 95.
%H A027641 K. Dilcher, <a href="http://www.mscs.dal.ca/%7Edilcher/bernoulli.html">A Bibliography of Bernoulli Numbers (Alphabetically Indexed Authorwise)</a>.
%H A027641 Bakir Farhi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL28/Farhi/farhi26.html">Formulas Involving Bernoulli and Stirling Numbers of Both Kinds</a>, Journal of Integer Sequences, Vol. 28 (2025), Article 25.2.6. See p. 16.
%H A027641 Ghislain R. Franssens, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL9/Franssens/franssens13.html">On a Number Pyramid Related to the Binomial, Deleham, Eulerian, MacMahon and Stirling number triangles</a>, Journal of Integer Sequences, Vol. 9 (2006), Article 06.4.1.
%H A027641 H. W. Gould and J. Quaintance, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Quaintance/quain3.html">Bernoulli Numbers and a New Binomial Transform Identity</a>, J. Int. Seq. 17 (2014), Article 14.2.2.
%H A027641 M.-P. Grosset and A. P. Veselov, <a href="http://arXiv.org/abs/math.GM/0503175">Bernoulli numbers and solitons</a>, arXiv:math/0503175 [math.GM], 2005.
%H A027641 David Harvey, <a href="http://arxiv.org/abs/0807.1347">A multimodular algorithm for computing Bernoulli numbers</a>, arXiv:0807.1347 [math.NT], Jul 08 2008.
%H A027641 A. Iványi, <a href="http://www.emis.de/journals/AUSM/C5-1/math51-5.pdf">Leader election in synchronous networks</a>, Acta Univ. Sapientiae, Mathematica, 5, 2 (2013) 54-82.
%H A027641 Sumit Kumar Jha, <a href="https://doi.org/10.7546/nntdm.2020.26.2.148-151">A new explicit formula for the Bernoulli numbers in terms of the Stirling numbers of the second kind</a>, Notes on Number Theory and Discrete Mathematics (2020) Vol. 26, No. 2, 148-151.
%H A027641 M. Kaneko, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL3/KANEKO/AT-kaneko.html">The Akiyama-Tanigawa algorithm for Bernoulli numbers</a>, J. Integer Sequences, 3 (2000), Article 00.2.9.
%H A027641 Wolfdieter Lang, <a href="https://arxiv.org/abs/1707.04451">On Sums of Powers of Arithmetic Progressions, and Generalized Stirling, Eulerian and Bernoulli numbers</a>, arXiv:1707.04451 [math.NT], 2017.
%H A027641 Guo-Dong Liu, H. M. Srivastava, and Hai-Quing Wang, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Srivastava/sriva3.html">Some Formulas for a Family of Numbers Analogous to the Higher-Order Bernoulli Numbers</a>, J. Int. Seq. 17 (2014), Article 14.4.6.
%H A027641 F. Luca and P. Stanica, <a href="http://calhoun.nps.edu/bitstream/handle/10945/29605/LucaStanicaJCNTfinal.pdf?sequence=1">On some conjectures on the monotonicity of some arithmetical sequences</a>, J. Combin. Number Theory 4 (2012) 1-10.
%H A027641 Peter Luschny, <a href="http://luschny.de/math/zeta/The-Bernoulli-Manifesto.html">The Bernoulli Manifesto. A survey on the occasion of the 300th anniversary of the publication of Jacob Bernoulli's Ars Conjectandi, 1713-2013</a>.
%H A027641 Romeo Meštrović, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Mestrovic/mes4.html">On a Congruence Modulo n^3 Involving Two Consecutive Sums of Powers</a>, Journal of Integer Sequences, Vol. 17 (2014), Article 14.8.4.
%H A027641 Hisanori Mishima, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/matha1/matha134.htm">Bernoulli numbers (n = 2 to 114)</a>, <a href="http://www.asahi-net.or.jp/~KC2H-MSM/mathland/matha1/matha1341.htm">(n = 116 to 154)</a> (Factorizations).
%H A027641 Ben Moonen, <a href="https://arxiv.org/abs/2407.05837">A remark on the paper of Deninger and Murre</a>, arXiv:2407.05837 [math.AG], 2024. See p. 6.
%H A027641 A. F. Neto, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Neto/neto7.html">Carlitz's Identity for the Bernoulli Numbers and Zeon Algebra</a>, J. Int. Seq. 18 (2015), Article 15.5.6.
%H A027641 A. F. Neto, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Neto/neto10.html">A note of a Theorem of Guo, Mezo, and Qi</a>, J. Int. Seq. 19 (2016) Article 16.4.8.
%H A027641 Niels Nielsen, <a href="http://gallica.bnf.fr/ark:/12148/bpt6k62119c">Traite Elementaire des Nombres de Bernoulli</a>, Gauthier-Villars, 1923, pp. 398.
%H A027641 Simon Plouffe, <a href="http://www.ibiblio.org/gutenberg/etext01/brnll10.txt">The First 498 Bernoulli numbers</a>. [Project Gutenberg Etext]
%H A027641 Ed Sandifer, How Euler Did It, <a href="https://www.maa.org/sites/default/files/pdf/editorial/euler/How%20Euler%20Did%20It%2023%20Bernoulli%20numbers.pdf">Bernoulli numbers</a>.
%H A027641 N. J. A. Sloane, <a href="https://arxiv.org/abs/2301.03149">"A Handbook of Integer Sequences" Fifty Years Later</a>, arXiv:2301.03149 [math.NT], 2023, p. 5.
%H A027641 J. Singh, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Singh/singh8.html">On an Arithmetic Convolution</a>, J. Int. Seq. 17 (2014) Article 14.6.7.
%H A027641 J. Sondow and E. Tsukerman, <a href="https://arxiv.org/abs/1401.0322">The p-adic order of power sums, the Erdos-Moser equation, and Bernoulli numbers</a>, arXiv:1401.0322 [math.NT], 2014; see section 5.
%H A027641 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/BernoulliNumber.html">Bernoulli Number</a>.
%H A027641 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PolygammaFunction.html">Polygamma Function</a>.
%H A027641 Roman Witula, Damian Slota and Edyta Hetmaniok, <a href="http://ami.ektf.hu/uploads/papers/finalpdf/AMI_41_from255to263.pdf">Bridges between different known integer sequences</a>, Annales Mathematicae et Informaticae, 41 (2013) pp. 255-263.
%H A027641 Wolfram Research, <a href="http://functions.wolfram.com/IntegerFunctions/BernoulliB/11">Generating functions of B_n & B_2n</a>.
%H A027641 <a href="/index/Cor#core">Index entries for "core" sequences</a>.
%H A027641 <a href="/index/Be#Bernoulli">Index entries for sequences related to Bernoulli numbers</a>.
%F A027641 E.g.f: x/(exp(x) - 1); take numerators.
%F A027641 Recurrence: B^n = (1+B)^n, n >= 2 (interpreting B^j as B_j).
%F A027641 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).
%F A027641 Sum_{i=1..n-1} i^k = ((n+B)^(k+1)-B^(k+1))/(k+1) (interpreting B^j as B_j).
%F A027641 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]
%F A027641 Sum_{i>=1} 1/i^(2k) = zeta(2k) = (2*Pi)^(2k)*|B_{2k}|/(2*(2k)!).
%F A027641 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).
%F A027641 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
%F A027641 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
%F A027641 From _Sergei N. Gladkovskii_, Dec 04 2012: (Start)
%F A027641 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.
%F A027641 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)
%F A027641 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
%F A027641 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
%F A027641 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
%F A027641 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
%F A027641 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
%F A027641 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
%F A027641 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
%F A027641 a(n) = numerator((-1)^n*A155585(n-1)*n/(4^n-2^n)), for n>=1. - _Mats Granvik_, Nov 26 2017
%F A027641 From _Artur Jasinski_, Dec 30 2020: (Start)
%F A027641 a(n) = numerator(-2*cos(Pi*n/2)*Gamma(n+1)*zeta(n)/(2*Pi)^n), for n=0 and n>1.
%F A027641 a(n) = numerator(-n*zeta(1-n)), for n=0 and n>1. (End)
%F A027641 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
%e A027641 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, ...
%p A027641 B := n -> add((-1)^m*m!*Stirling2(n, m)/(m+1), m=0..n);
%p A027641 B := n -> bernoulli(n);
%p A027641 seq(numer(bernoulli(n)), n=0..40); # _Zerinvary Lajos_, Apr 08 2009
%t A027641 Table[ Numerator[ BernoulliB[ n]], {n, 0, 40}] (* _Robert G. Wilson v_, Oct 11 2004 *)
%t A027641 Numerator[ Range[0, 40]! CoefficientList[ Series[x/(E^x - 1), {x, 0, 40}], x]]
%t A027641 Numerator[CoefficientList[Series[PolyGamma[1, 1/x]/x - x, {x, 0, 40}, Assumptions -> x > 0], x]] (* _Vladimir Reshetnikov_, Apr 24 2013 *)
%o A027641 (PARI) a(n)=numerator(bernfrac(n))
%o A027641 (Maxima) B(n):=(-1)^((n))*sum((stirling1(n,k)*stirling2(n+k,n))/binomial(n+k,k),k,0,n);
%o A027641 makelist(num(B(n)),n,0,20); /* _Vladimir Kruchinin_, Mar 16 2013 */
%o A027641 (Magma) [Numerator(Bernoulli(n)): n in [0..40]]; // _Vincenzo Librandi_, Mar 17 2014
%o A027641 (SageMath)
%o A027641 [bernoulli(n).numerator() for n in range(41)]  # _Peter Luschny_, Feb 19 2016
%o A027641 (SageMath) # Alternatively:
%o A027641 def A027641_list(len):
%o A027641     f, R, C = 1, [1], [1]+[0]*(len-1)
%o A027641     for n in (1..len-1):
%o A027641         f *= n
%o A027641         for k in range(n, 0, -1):
%o A027641             C[k] = C[k-1] / (k+1)
%o A027641         C[0] = -sum(C[k] for k in (1..n))
%o A027641         R.append((C[0]*f).numerator())
%o A027641     return R
%o A027641 A027641_list(41)  # _Peter Luschny_, Feb 20 2016
%o A027641 (Python)
%o A027641 from sympy import bernoulli
%o A027641 from fractions import Fraction
%o A027641 [bernoulli(i).as_numer_denom()[0] for i in range(51)]  # _Indranil Ghosh_, Mar 18 2017
%o A027641 (Python)
%o A027641 from sympy import bernoulli
%o A027641 def A027641(n): return bernoulli(n).p
%o A027641 print([A027641(n) for n in range(80)])  # _M. F. Hasler_, Jun 11 2019
%Y A027641 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!
%Y A027641 A refinement is A194587.
%Y A027641 Cf. A000146, A002882, A003245, A127187, A127188, A074909, A164555, A176327, A190339, A131689.
%Y A027641 Cf. A094816, A130189, A130190, A155585.
%K A027641 sign,frac,nice,core
%O A027641 0,11
%A A027641 _N. J. A. Sloane_