Combinatorics.jl icon indicating copy to clipboard operation
Combinatorics.jl copied to clipboard

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

Open rben01 opened this issue 2 years ago • 0 comments

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 .

rben01 avatar Apr 17 '23 04:04 rben01