cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A193073 #44 May 09 2020 07:24:28
%S A193073 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 A193073 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 A193073 3,4,1,1,4,2,5,1,6,1,1,1,1,1,1,1,2,1
%N A193073 Triangle in which n-th row lists all partitions of n, in graded lexicographical ordering.
%C A193073 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 A193073 Alois P. Heinz, <a href="/A193073/b193073.txt">Rows n = 1..19, flattened</a>
%H A193073 OEIS Wiki, <a href="http://oeis.org/wiki/Orderings of partitions">Orderings of partitions</a>.
%H A193073 Wikiversity, <a href="https://en.wikiversity.org/wiki/Lexicographic_and_colexicographic_order">Lexicographic and colexicographic order</a>
%e A193073 First five rows are:
%e A193073 [[1]]
%e A193073 [[1, 1], [2]]
%e A193073 [[1, 1, 1], [2, 1], [3]]
%e A193073 [[1, 1, 1, 1], [2, 1, 1], [2, 2], [3, 1], [4]]
%e A193073 [[1, 1, 1, 1, 1], [2, 1, 1, 1], [2, 2, 1], [3, 1, 1], [3, 2], [4, 1], [5]]
%e A193073 From _Gus Wiseman_, May 08 2020: (Start)
%e A193073 The sequence of all partitions begins:
%e A193073   ()           (2,2,1)        (5,1)            (5,2)
%e A193073   (1)          (3,1,1)        (6)              (6,1)
%e A193073   (1,1)        (3,2)          (1,1,1,1,1,1,1)  (7)
%e A193073   (2)          (4,1)          (2,1,1,1,1,1)    (1,1,1,1,1,1,1,1)
%e A193073   (1,1,1)      (5)            (2,2,1,1,1)      (2,1,1,1,1,1,1)
%e A193073   (2,1)        (1,1,1,1,1,1)  (2,2,2,1)        (2,2,1,1,1,1)
%e A193073   (3)          (2,1,1,1,1)    (3,1,1,1,1)      (2,2,2,1,1)
%e A193073   (1,1,1,1)    (2,2,1,1)      (3,2,1,1)        (2,2,2,2)
%e A193073   (2,1,1)      (2,2,2)        (3,2,2)          (3,1,1,1,1,1)
%e A193073   (2,2)        (3,1,1,1)      (3,3,1)          (3,2,1,1,1)
%e A193073   (3,1)        (3,2,1)        (4,1,1,1)        (3,2,2,1)
%e A193073   (4)          (3,3)          (4,2,1)          (3,3,1,1)
%e A193073   (1,1,1,1,1)  (4,1,1)        (4,3)            (3,3,2)
%e A193073   (2,1,1,1)    (4,2)          (5,1,1)          (4,1,1,1,1)
%e A193073 The triangle with partitions shown as Heinz numbers (A334434) begins:
%e A193073     1
%e A193073     2
%e A193073     4   3
%e A193073     8   6   5
%e A193073    16  12   9  10   7
%e A193073    32  24  18  20  15  14  11
%e A193073    64  48  36  27  40  30  25  28  21  22  13
%e A193073   128  96  72  54  80  60  45  50  56  42  35  44  33  26  17
%e A193073 (End)
%t A193073 row[n_] := Flatten[Reverse[Reverse /@ SplitBy[IntegerPartitions[n], Length] ], 1]; Array[row, 19] // Flatten (* _Jean-François Alcover_, Dec 05 2016 *)
%t A193073 lexsort[f_,c_]:=OrderedQ[PadRight[{f,c}]];
%t A193073 Join@@Table[Sort[IntegerPartitions[n],lexsort],{n,0,8}] (* _Gus Wiseman_, May 08 2020 *)
%o A193073 (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 A193073 (Sage)
%o A193073 def p(n, i):
%o A193073     if n==0 or i==1: return [[1]*n]
%o A193073     T = [[i] + x for x in p(n-i, i)] if i<=n else []
%o A193073     return p(n, i-1) + T
%o A193073 A193073 = lambda n: p(n,n)
%o A193073 for n in (1..5): print(A193073(n)) # _Peter Luschny_, Aug 07 2015
%Y A193073 See A036036 for the Hindenburg (graded reflected colexicographic) ordering (listed in the Abramowitz and Stegun Handbook).
%Y A193073 See A036037 for graded colexicographic ordering.
%Y A193073 See A080576 for the Maple (graded reflected lexicographic) ordering.
%Y A193073 See A080577 for the Mathematica (graded reverse lexicographic) ordering.
%Y A193073 See A228100 for the Fenner-Loizou (binary tree) ordering.
%Y A193073 A006128 gives row lengths.
%Y A193073 Row n has A000041(n) partitions.
%Y A193073 The version for reversed (weakly increasing) partitions is A026791.
%Y A193073 Lengths of these partitions appear to be A049085.
%Y A193073 Taking colex instead of lex gives A211992.
%Y A193073 The generalization to compositions is A228351.
%Y A193073 Sorting partitions by Heinz number gives A296150.
%Y A193073 The length-sensitive refinement is A334301.
%Y A193073 The Heinz numbers of these partitions are A334434.
%Y A193073 Cf. A066099, A129129, A185974, A228531, A334302, A334433, A334437, A334439.
%K A193073 nonn,tabf
%O A193073 1,4
%A A193073 _M. F. Hasler_, Jul 15 2011