JuliaMath / JuliaMath/Combinatorics.jl
Add "partition number" `p(n)`
- Dominant language
- Julia
- Stars
- 230
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
`partition_num(n::Int) == length(integer_partitions(n::Int)) == length(partitions(n::Int))`
Clean and export `npartitions`
https://github.com/JuliaMath/Combinatorics.jl/blob/edb9c2cba7240af0ca7f7b71164e269ed6868b7a/src/partitions.jl#L105-L124
ref:
- [number of partitions of n - A000041 - OEIS](https://oeis.org/A000041)
- [`NrPartitions(n)` - GAP (ref) - Chapter 16: Combinatorics](https://docs.gap-system.org/doc/ref/chap16.html#X86933C4F795C4EBD)
- [Partition Function P - MathWorld](https://mathworld.wolfram.com/PartitionFunctionP.html)
- [`PartitionsP[n]` — Wolfram](https://reference.wolfram.com/language/ref/PartitionsP.html)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.