BernoulliB
The nth Bernoulli number, a rational sequence appearing in power-sum (Faulhaber) formulas and series expansions.
Bernoulli numberMathWorldBernoulliNumberWikidataQ694114nLabBernoulli numberDLMF24.2.iFungrimBernoulliB✓Fungrim entryOEISA027641A027642Wolfram LanguageBernoulliB✓BernoulliB(n)the nth Bernoulli number .BernoulliB(n, x)the Bernoulli polynomial .bernoulli_polynomial(x, n)SymPybernoulli(n, x)mpmathbernpoly(n, x)Juliaenumeratio_bernoulli_poly(n, x)Typed signatures
| Type | Package | Applies |
|---|---|---|
(integer) -> rational | compute-engine | always |
(integer, number?) -> number | analyticreplaces compute-engine | always |
Details
- Defined by the generating function .
- for every odd ; under this (the "") convention.
- Drive Faulhaber's formula for power sums, . See Binomial.
- Related to the Riemann zeta function: for , and .
- compute-engine only defines for nonnegative integer . With a second argument, BernoulliB(n, x) is the Bernoulli polynomial , as in Wolfram — the same as BernoulliPolynomial.
Plot
Examples
1 more kept as data, checked against the oraclesScope #
With a second argument, the Bernoulli polynomial — BernoulliPolynomial under Wolfram's name
live ↗Properties #
Odd-index Bernoulli numbers beyond 1 vanish
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB
: odd Bernoulli numbers past vanish
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB
, while the even ones alternate in sign
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB
The Bernoulli polynomial at 0 is the Bernoulli number
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB:Polynomial
Odd Bernoulli polynomials vanish at 0
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB:Polynomial
: for the polynomial agrees at 0 and 1
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB:Polynomial
Odd Bernoulli polynomials vanish at 1
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB:Polynomial
The index-0 polynomial is the constant 1
live ↗Known value · Wolfram MathematicalFunctionData, BernoulliB:Polynomial
Possible issues #
Neat examples #
About
| Examples | 37 |
|---|---|
| Checked against | Wolfram Language 37 agreeSageMath 31 agree6 errorSymPy 30 agree5 differ1 unevaluatedmpmath 27 agree1 errormathlib4 18 agree4 errorJulia 28 agree1 error |
| Crosswalk | WikipediaMathWorldWikidatanLabDLMFFungrimFungrim entry ×17OEIS ×2Wolfram LanguageSageMath ×2SymPy ×2mpmath ×2Julia ×2 |
Implementation
wolframpackages/oracle/src/mappings.tssympypackages/oracle/src/mappings.tssagepackages/oracle/src/mappings.tssympypackages/oracle/src/mappings.tsmpmathpackages/oracle/src/mappings.tsmpmathpackages/oracle/src/mappings.tssagepackages/oracle/src/mappings.tsjuliapackages/oracle/src/mappings.tsjuliapackages/oracle/src/mappings.tsmathlib4packages/oracle/src/mappings.tsMathlib's bernoulli (not bernoulli', which has B(1) = +1/2) takes B(1) = -1/2, as Wolfram does; natural n only.