Finding certain partitions using Sage
Context
A partition of is a nonempty list p=[p1,p2,...,pn] of positive integers (called the parts), of length n≥1.
The list is considered sorted in nondecreasing order: p1≤p2≤...≤pn.
Consider an integer d≥1. The partition p is called d-admissible if each part pi is at least 2 and inverses of the parts sum to n−d−1.
In formulas: 2≤p1 and n−d−1=n∑i=11pi.
Question
Is there a quick way to filter all partitions using Sage to find all d-admissible partitions for a fixed d≥1?
Note that the assumptions imply n≤2(d+1) but the individual terms pi might get quite large (for d=2 the largest is already 42), which makes it very complicated to obtain a program that is quick and works for large d.
For example for d=1 there are four 1-admissible partitions, namely: [2,2,2,2], [3,3,3] ,[2,4,4] and [2,3,6]. For d=2 there are eighteen 2-admissible partitions.
The partition
[2,2,2,2]
does not seem to be 1-admissible. The sum of the inverse gives 2 which is not8 - 1 - 1 = 6
. Is it 1-admissible whenk-d-1
is the sum of the inverse of their parts?Sorry, in an early edit of this question I misunderstood the notation and thought n was the sum of the parts, rather than the number of parts. Restored now.