Skip to content

bug in Partitions #6538

@jhpalmieri

Description

@jhpalmieri

Looks like there is a bug in Partitions. Partitions(n, max_slope=-1) should give the partitions of n with distinct parts, right?

sage: Partitions(2, max_slope=-1).list()
[[2]]
sage: Partitions(4, max_slope=-1).list()
[[4], [3, 1]]

But if you add the "length" keyword, it doesn't work anymore, at least not completely:

sage: Partitions(2, max_slope=-1, length=2).list()  # doesn't work
[[1, 1]]
sage: Partitions(4, max_slope=-1, length=2).list()  # works
[[3, 1]]
sage: Partitions(4, max_slope=-1, length=3).list()  # doesn't work
[[2, 1, 1]]

Depends on #12925

CC: @sagetrac-brunellus

Component: combinatorics

Keywords: partitions, days38

Author: Travis Scrimshaw

Reviewer: Benjamin Jones

Merged: sage-5.3.beta2

Issue created by migration from https://trac.sagemath.org/ticket/6538

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions