login
Triangle in which n-th row lists all partitions of n, in graded lexicographical ordering.
50

%I #44 May 09 2020 07:24:28

%S 1,1,1,2,1,1,1,2,1,3,1,1,1,1,2,1,1,2,2,3,1,4,1,1,1,1,1,2,1,1,1,2,2,1,

%T 3,1,1,3,2,4,1,5,1,1,1,1,1,1,2,1,1,1,1,2,2,1,1,2,2,2,3,1,1,1,3,2,1,3,

%U 3,4,1,1,4,2,5,1,6,1,1,1,1,1,1,1,2,1

%N Triangle in which n-th row lists all partitions of n, in graded lexicographical ordering.

%C The partitions of the integer n are sorted in lexicographical order (cf. link: sums are written with terms in decreasing order, then they are sorted in lexicographical (increasing) order), i.e., as [1,1,...,1], [2,1,...,1], [2,2,...], ..., [n].

%H Alois P. Heinz, <a href="/A193073/b193073.txt">Rows n = 1..19, flattened</a>

%H OEIS Wiki, <a href="http://oeis.org/wiki/Orderings of partitions">Orderings of partitions</a>.

%H Wikiversity, <a href="https://en.wikiversity.org/wiki/Lexicographic_and_colexicographic_order">Lexicographic and colexicographic order</a>

%e First five rows are:

%e [[1]]

%e [[1, 1], [2]]

%e [[1, 1, 1], [2, 1], [3]]

%e [[1, 1, 1, 1], [2, 1, 1], [2, 2], [3, 1], [4]]

%e [[1, 1, 1, 1, 1], [2, 1, 1, 1], [2, 2, 1], [3, 1, 1], [3, 2], [4, 1], [5]]

%e From _Gus Wiseman_, May 08 2020: (Start)

%e The sequence of all partitions begins:

%e () (2,2,1) (5,1) (5,2)

%e (1) (3,1,1) (6) (6,1)

%e (1,1) (3,2) (1,1,1,1,1,1,1) (7)

%e (2) (4,1) (2,1,1,1,1,1) (1,1,1,1,1,1,1,1)

%e (1,1,1) (5) (2,2,1,1,1) (2,1,1,1,1,1,1)

%e (2,1) (1,1,1,1,1,1) (2,2,2,1) (2,2,1,1,1,1)

%e (3) (2,1,1,1,1) (3,1,1,1,1) (2,2,2,1,1)

%e (1,1,1,1) (2,2,1,1) (3,2,1,1) (2,2,2,2)

%e (2,1,1) (2,2,2) (3,2,2) (3,1,1,1,1,1)

%e (2,2) (3,1,1,1) (3,3,1) (3,2,1,1,1)

%e (3,1) (3,2,1) (4,1,1,1) (3,2,2,1)

%e (4) (3,3) (4,2,1) (3,3,1,1)

%e (1,1,1,1,1) (4,1,1) (4,3) (3,3,2)

%e (2,1,1,1) (4,2) (5,1,1) (4,1,1,1,1)

%e The triangle with partitions shown as Heinz numbers (A334434) begins:

%e 1

%e 2

%e 4 3

%e 8 6 5

%e 16 12 9 10 7

%e 32 24 18 20 15 14 11

%e 64 48 36 27 40 30 25 28 21 22 13

%e 128 96 72 54 80 60 45 50 56 42 35 44 33 26 17

%e (End)

%t row[n_] := Flatten[Reverse[Reverse /@ SplitBy[IntegerPartitions[n], Length] ], 1]; Array[row, 19] // Flatten (* _Jean-François Alcover_, Dec 05 2016 *)

%t lexsort[f_,c_]:=OrderedQ[PadRight[{f,c}]];

%t Join@@Table[Sort[IntegerPartitions[n],lexsort],{n,0,8}] (* _Gus Wiseman_, May 08 2020 *)

%o (PARI) A193073_row(n)=concat(vecsort(apply(P->Vec(vecsort(P,,4)),partitions(n)))) \\ The two vecsort() are needed since the PARI function (version >= 2.7.1) yields the partitions in Abramowitz-Stegun order: sorted by increasing length, decreasing largest part, then lex order, with parts in increasing order. - _M. F. Hasler_, Jun 04 2018 [replaced older code from Jul 12 2015]

%o (Sage)

%o def p(n, i):

%o if n==0 or i==1: return [[1]*n]

%o T = [[i] + x for x in p(n-i, i)] if i<=n else []

%o return p(n, i-1) + T

%o A193073 = lambda n: p(n,n)

%o for n in (1..5): print(A193073(n)) # _Peter Luschny_, Aug 07 2015

%Y See A036036 for the Hindenburg (graded reflected colexicographic) ordering (listed in the Abramowitz and Stegun Handbook).

%Y See A036037 for graded colexicographic ordering.

%Y See A080576 for the Maple (graded reflected lexicographic) ordering.

%Y See A080577 for the Mathematica (graded reverse lexicographic) ordering.

%Y See A228100 for the Fenner-Loizou (binary tree) ordering.

%Y A006128 gives row lengths.

%Y Row n has A000041(n) partitions.

%Y The version for reversed (weakly increasing) partitions is A026791.

%Y Lengths of these partitions appear to be A049085.

%Y Taking colex instead of lex gives A211992.

%Y The generalization to compositions is A228351.

%Y Sorting partitions by Heinz number gives A296150.

%Y The length-sensitive refinement is A334301.

%Y The Heinz numbers of these partitions are A334434.

%Y Cf. A066099, A129129, A185974, A228531, A334302, A334433, A334437, A334439.

%K nonn,tabf

%O 1,4

%A _M. F. Hasler_, Jul 15 2011