OFFSET
1,2
COMMENTS
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..3615 (rows 1..15)
Wikiversity, Lexicographic and colexicographic order
EXAMPLE
The sequence of all partitions begins:
() (32) (21111) (22111) (4211) (63)
(1) (311) (111111) (211111) (3311) (54)
(2) (221) (7) (1111111) (3221) (711)
(11) (2111) (61) (8) (2222) (621)
(3) (11111) (52) (71) (41111) (531)
(21) (6) (43) (62) (32111) (522)
(111) (51) (511) (53) (22211) (441)
(4) (42) (421) (44) (311111) (432)
(31) (33) (331) (611) (221111) (333)
(22) (411) (322) (521) (2111111) (6111)
(211) (321) (4111) (431) (11111111) (5211)
(1111) (222) (3211) (422) (9) (4311)
(5) (3111) (2221) (332) (81) (4221)
(41) (2211) (31111) (5111) (72) (3321)
This sequence can also be interpreted as the following triangle, whose n-th row is itself a finite triangle with A000041(n) rows.
0
(1)
(2)(11)
(3)(21)(111)
(4)(31)(22)(211)(1111)
(5)(41)(32)(311)(221)(2111)(11111)
Showing partitions as their Heinz numbers (see A334438) gives:
1
2
3 4
5 6 8
7 10 9 12 16
11 14 15 20 18 24 32
13 22 21 25 28 30 27 40 36 48 64
17 26 33 35 44 42 50 45 56 60 54 80 72 96 128
MAPLE
A334439row := proc(n) local b; # after Alois P. Heinz
b := (n, i)-> ifelse(n = 0 or i = 1, [[1$n]],
[map(x -> [i, x[]], b(n-i, min(n-i, i)))[], b(n, i-1)[]]):
sort([map(x-> x[], [b(n$2)])[]], length) end:
seq(print(A334439row(n)), n = 0..10): # Peter Luschny, Apr 29 2026
MATHEMATICA
revlensort[f_, c_]:=If[Length[f]!=Length[c], Length[f]<Length[c], OrderedQ[{c, f}]];
Join@@Table[Sort[IntegerPartitions[n], revlensort], {n, 0, 8}]
PROG
(PARI)
cmpLenLexDesc(x, y)=my(d=cmp(#x, #y)); if(d, d, -lex(x, y))
Row(n)={concat(vecsort([Vecrev(p) | p<-partitions(n)], cmpLenLexDesc))}
{ for(n=1, 7, print(Row(n))) } \\ Andrew Howroyd, Oct 06 2025
(Python)
def A334439row(n):
def b(n, i):
if n == 0: yield []
elif i == 1: yield [1] * n
else:
if n >= i: # Prepend 'i' to partitions of n-i with max part min(n-i, i)
for p in b(n - i, min(n - i, i)): yield [i] + p
yield from b(n, i - 1) # Yield partitions of n with max part i-1
if n == 0: return [[]]
partitions = list(b(n, n))
partitions.sort(key=len)
return partitions # Peter Luschny, May 01 2026
CROSSREFS
The version for colex instead of revlex is A036037.
Row lengths are A036043.
Ignoring length gives A080577.
The version for compositions is A296774.
The Abramowitz-Stegun version (sum/length/lex) is A334301.
The version for reversed partitions is A334302.
Taking Heinz numbers gives A334438.
The version with partitions reversed is A334442.
Lexicographically ordered reversed partitions are A026791.
Lexicographically ordered partitions are A193073.
Sorting partitions by Heinz number gives A296150.
KEYWORD
nonn,tabf
AUTHOR
Gus Wiseman, May 03 2020
EXTENSIONS
Offset corrected by Andrew Howroyd, Oct 06 2025
STATUS
approved
