A026791 Triangle in which n-th row lists juxtaposed lexicographically ordered partitions of n; e.g., the partitions of 3 (1+1+1,1+2,3) appear as 1,1,1,1,2,3 in row 3.
1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 2, 2, 1, 4, 2, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 4, 1, 2, 3, 1, 5, 2, 2, 2, 2, 4, 3, 3, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 2, 3, 1, 1, 5
Offset: 1
Examples
First six rows are: [[1]]; [[1, 1], [2]]; [[1, 1, 1], [1, 2], [3]]; [[1, 1, 1, 1], [1, 1, 2], [1, 3], [2, 2], [4]]; [[1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 3], [1, 2, 2], [1, 4], [2, 3], [5]]; [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2], [1, 1, 1, 3], [1, 1, 2, 2], [1, 1, 4], [1, 2, 3], [1, 5], [2, 2, 2], [2, 4], [3, 3], [6]]; ... From _Omar E. Pol_, Sep 03 2013: (Start) Illustration of initial terms: ---------------------------------- . Ordered n j Diagram partition j ---------------------------------- . _ 1 1 |_| 1; . _ _ 2 1 | |_| 1, 1, 2 2 |_ _| 2; . _ _ _ 3 1 | | |_| 1, 1, 1, 3 2 | |_ _| 1, 2, 3 3 |_ _ _| 3; . _ _ _ _ 4 1 | | | |_| 1, 1, 1, 1, 4 2 | | |_ _| 1, 1, 2, 4 3 | |_ _ _| 1, 3, 4 4 | |_ _| 2, 2, 4 5 |_ _ _ _| 4; ... (End)
Links
- Alois P. Heinz, Rows n = 1..19, flattened
- Wikiversity, Lexicographic and colexicographic order
Crossrefs
Row lengths are given in A006128.
Partition lengths are in A193173.
Other partition orderings: A026792, A036037, A080577, A125106, A139100, A181087, A181317, A182937, A228100, A240837, A242628.
Row lengths are A000041.
Partition sums are A036042.
Partition minima are A196931.
Partition maxima are A194546.
The reflected version is A211992.
The length-sensitive version (sum/length/lex) is A036036.
The colexicographic version (sum/colex) is A080576.
The version for non-reversed partitions is A193073.
Compositions under the same ordering (sum/lex) are A228369.
The reverse-lexicographic version (sum/revlex) is A228531.
The Heinz numbers of these partitions are A334437.
Programs
-
Maple
T:= proc(n) local b, ll; b:= proc(n,l) if n=0 then ll:= ll, l[] else seq(b(n-i, [l[], i]), i=`if`(l=[],1,l[-1])..n) fi end; ll:= NULL; b(n, []); ll end: seq(T(n), n=1..8); # Alois P. Heinz, Jul 16 2011
-
Mathematica
T[n0_] := Module[{b, ll}, b[n_, l_] := If[n == 0, ll = Join[ll, l], Table[ b[n - i, Append[l, i]], {i, If[l == {}, 1, l[[-1]]], n}]]; ll = {}; b[n0, {}]; ll]; Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Aug 05 2015, after Alois P. Heinz *) Table[DeleteCases[Sort@PadRight[Reverse /@ IntegerPartitions[n]], x_ /; x == 0, 2], {n, 7}] // Flatten (* Robert Price, May 18 2020 *)
-
Python
t = [[[]]] for n in range(1, 10): p = [] for minp in range(1, n): p += [[minp] + pp for pp in t[n-minp] if min(pp) >= minp] t.append(p + [[n]]) print(t) # Andrey Zabolotskiy, Oct 18 2019
Comments