GAP Manual: 46.23. Bernoulli

Bernoulli( n )

Bernoulli returns the n-th Bernoulli number B_n, which is defined by B_0 = 1 and B_n = -sum_(k=0)^(n-1)((n+1 choosek) B_k)/(n+1).

B_n/n! is the coefficient of x^n in the power series of x/(e^x-1). Except for B_1=-1/2 the Bernoulli numbers for odd indices m are zero.

    gap> Bernoulli( 4 );
    -1/30
    gap> Bernoulli( 10 );
    5/66
    gap> Bernoulli( 12 );
    -691/2730    # there is no simple pattern in Bernoulli numbers
    gap> Bernoulli( 50 );
    495057205241079648212477525/66    # and they grow fairly fast 

~~~ [prev] [up]