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:`~mpmath.fibonacci`/``fib()``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.fibonacci


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

:func:`~mpmath.bernoulli`
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.bernoulli

:func:`~mpmath.bernfrac`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.bernfrac

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

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

:func:`~mpmath.eulernum`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.eulernum

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


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

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


Stirling numbers
...........................................

:func:`~mpmath.stirling1`
^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.stirling1

:func:`~mpmath.stirling2`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.stirling2


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

:func:`~mpmath.primepi`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.primepi

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

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


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

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


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

:func:`~mpmath.mangoldt`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. autofunction:: mpmath.mangoldt
