ai-content-maker/.venv/Lib/site-packages/sympy/ntheory/tests/test_partitions.py

13 lines
507 B
Python
Raw Permalink Normal View History

2024-05-03 04:18:51 +03:00
from sympy.ntheory import npartitions
def test_partitions():
assert [npartitions(k) for k in range(13)] == \
[1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77]
assert npartitions(100) == 190569292
assert npartitions(200) == 3972999029388
assert npartitions(1000) == 24061467864032622473692149727991
assert npartitions(2000) == 4720819175619413888601432406799959512200344166
assert npartitions(10000) % 10**10 == 6916435144
assert npartitions(100000) % 10**10 == 9421098519