JuliaMath / Combinatorics.jl

A combinatorics library for Julia
http://juliamath.github.io/Combinatorics.jl/dev/
Other
214 stars 58 forks source link

`integer_partitions(0)` should return `[[]]` instead of `[]` #138

Open rben01 opened 1 year ago

rben01 commented 1 year ago

By convention, there is a single partition of 0: the empty partition. However, integer_partitions(0) returns []. It should instead return [[]] so that length(integer_partitions(0)) == 1 in accordance with https://oeis.org/A000041 .