### The Maxima on-line user's manual

Algebra Calculator

#### Bern

Function: bern (<n>) Returns the <n>th Bernoulli number for integer <n>. Bernoulli numbers equal to zero are suppressed if `zerobern` is `false`.

See also `burn`.

```          (%i1) zerobern: true\$
(%i2) map (bern, [0, 1, 2, 3, 4, 5, 6, 7, 8]);
1  1       1      1        1
(%o2)       [1, - -, -, 0, - --, 0, --, 0, - --]
2  6       30     42       30
(%i3) zerobern: false\$
(%i4) map (bern, [0, 1, 2, 3, 4, 5, 6, 7, 8]);
1  1    1   5     691   7    3617  43867
(%o4) [1, - -, -, - --, --, - ----, -, - ----, -----]
2  6    30  66    2730  6    510    798```

There are also some inexact matches for `bern`. Try `?? bern` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### bern-bfloat-block-fpprec-makelist-numer-return-sum

rieman(s, k):=sum(n^(...

fpprec:40;

rieman(1, 10), bfloat;

Calculate

##### bern-powerseries-sin

powerseries(1/(sin(x)...

bern(0);

Calculate

##### bern-bfloat-block-fpprec-makelist-numer-return-sum

rieman(s, k):=sum(n^(...

fpprec:40;

rieman(1, 10), bfloat;

Calculate

##### bern-bfloat-block-fpprec-makelist-numer-return-sum

rieman(s, k):=sum(n^(...

fpprec:40;

rieman(1, 10), bfloat;

Calculate

##### bern-bfloat-block-fpprec-makelist-numer-return-sum

rieman(s, k):=sum(n^(...

fpprec:40;

rieman(1, 10), bfloat;

Calculate

##### bern

chinese([5,6],[3,4]);

bern(5);

Calculate

##### bern

chinese([1,2],[3,10]);

bern(5);

Calculate

##### bern-bfloat-block-fpprec-makelist-numer-return-sum

rieman(s, k):=sum(n^(...

fpprec:40;

rieman(1, 10), bfloat;

Calculate

##### bern-bfloat-block-fpprec-makelist-numer-return-sum

rieman(s, k):=sum(n^(...

fpprec:40;

rieman(1, 10), bfloat;

Calculate

##### bern-bfloat-block-fpprec-makelist-numer-return-sum

rieman(s, k):=sum(n^(...

fpprec:40;

rieman(1, 10), bfloat;

Calculate