mathtools.binomial_coefficient

abjad.tools.mathtools.binomial_coefficient.binomial_coefficient(n, k)[source]

New in version 2.0.

Binomial coefficient of n choose k:

abjad> from abjad.tools import mathtools
abjad> for k in range(8):
...     print k, '\t', mathtools.binomial_coefficient(8, k)
...
0  1
1  8
2  28
3  56
4  70
5  56
6  28
7  8

Return positive integer.

This Page