bernoulli - Maple Help

Online Help

All Products    Maple    MapleSim


bernoulli

compute Bernoulli numbers and polynomials

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

bernoulli(n)

bernoulli(n, x)

bernoulli(n, mode)

Parameters

n

-

nonnegint; the index of the required Bernoulli number or polynomial

x

-

algebraic; the expression at which the Bernoulli polynomial is evaluated

mode

-

(optional) equation of the form singleton = value, where value is true or false (default: false)

Description

• 

The bernoulli(n) function computes the nth Bernoulli number. Bernoulli numbers come from the coefficients in the Taylor expansion of x/(e^x - 1).

• 

The bernoulli(n, x) function computes the nth Bernoulli polynomial, in the expression x.

  

The nth Bernoulli number is defined as bernoulli(n, 0).

  

The nth Bernoulli polynomial, Bnx, is defined by the exponential generating function:

  

 

tⅇxtⅇt1=n=0Bnxtnn!

• 

The mode parameter controls whether or not the bernoulli routine computes additional Bernoulli numbers in parallel with the requested one.  For example, if your computer has 4 cores, then the commands bernoulli(1000) and bernoulli(1000, singleton=false) will compute (and store) bernoulli(1002), bernoulli(1004), and bernoulli(1006).  Since in practice nearly all computations which use Bernoulli numbers require many of them, and require them in sequence, this results in considerable efficiency gains.  The commands bernoulli(1000, singleton) and bernoulli(1000, singleton=true) (which are equivalent) will result in only the 1000th Bernoulli number being computed.

The mode option has no effect if your computer has only a single core.

Examples

bernoulli4

130

(1)

bernoulli4,0

130

(2)

bernoulli4,x

130+x42x3+x2

(3)

bernoulli4,12

7240

(4)

bernoulli4,4x

130+256x4128x3+16x2

(5)

bernoulli0,975

1

(6)

The first 15 Bernoulli numbers are listed in the following table. It can be noted that Bn  = 0_ for all odd 1<n.

DocumentTools:-Tabulaten&comma;seq1..15&comma;B__n&comma;seqbernoullii&comma;i=1..15&comma;`=`fillcolor&comma;T&comma;i&comma;j`if`typej&comma;evenandj2&comma;LightGrey&comma;White

Tabulate

(7)

n

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

B__n

12

16

0

130

0

142

0

130

0

566

0

6912730

0

76

0

 

Compatibility

• 

The mode parameter was introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

euler

initialfunctions