R/ntheory.R
npartitions.Rd
npartitions(n) is the number of ways of writing n as a sum of positive integers, as partition() gives symbolically.
npartitions(n)
n
partition()
A nonnegative integer.
An integer (a gmp big integer from n = 300 on).
gmp
n = 300
npartitions(25) #> [1] 1958 npartitions(1000) #> Big Integer ('bigz') : #> [1] 24061467864032622473692149727991