Number-theoretical, combinatorial and integer functions
-------------------------------------------------------

For factorial-type functions, including binomial coefficients,
double factorials, etc., see the separate
section :doc:`gamma`.

Fibonacci numbers
.................

:func:`fibonacci`/:func:`fib`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.fibonacci(n, **kwargs)


Bernoulli numbers and polynomials
.................................

:func:`bernoulli`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.bernoulli(n)

:func:`bernfrac`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.bernfrac(n)

:func:`bernpoly`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.bernpoly(n,z)

Euler numbers and polynomials
.................................

:func:`eulernum`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.eulernum(n)

:func:`eulerpoly`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.eulerpoly(n,z)


Bell numbers and polynomials
...........................................

:func:`bell`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.bell(n,x)


Prime counting functions
........................

:func:`primepi`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.primepi(x)

:func:`primepi2`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.primepi2(x)

:func:`riemannr`
^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.riemannr(x)


Cyclotomic polynomials
......................

:func:`cyclotomic`
^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.cyclotomic(n,x)


Arithmetic functions
......................

:func:`mangoldt`
^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.mangoldt(n)
