login
A108244
Triangle read by rows: row n gives list of all compositions of n ordered first by decreasing length, then by reverse colexicographical order.
8
1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 2, 2, 3, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 2, 2, 2, 1, 2, 1, 3, 1, 2, 2, 1, 3, 1, 1, 1, 4, 2, 3, 3, 2, 4, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1
OFFSET
1,4
COMMENTS
An example of a sequence which contains all finite sequences of positive integers as subsequences.
From Andrey Zabolotskiy, May 18 2018: (Start)
At first, the ordering within the compositions of fixed length coincides with the lexicographical order (which is the case of A228369), but for n = 5 the partitions {2, 1, 2}, {1, 3, 1}, {2, 2, 1} go in this order because the order becomes reverse lexicographical when they are reversed (read right-to-left): {2, 1, 2}, {1, 3, 1}, {1, 2, 2}.
Length of k-th composition is A124748(k-1)+1.
Reversing every composition gives A296772. (End)
LINKS
Eric Weisstein's World of Mathematics, Combinatorial composition
EXAMPLE
The first 5 rows are:
{1}
{1, 1}, {2}
{1, 1, 1}, {1, 2}, {2, 1}, {3}
{1, 1, 1, 1}, {1, 1, 2}, {1, 2, 1}, {2, 1, 1}, {1, 3}, {2, 2}, {3, 1}, {4}
{1, 1, 1, 1, 1}, {1, 1, 1, 2}, {1, 1, 2, 1}, {1, 2, 1, 1}, {2, 1, 1, 1}, {1, 1, 3}, {1, 2, 2}, {2, 1, 2}, {1, 3, 1}, {2, 2, 1}, {3, 1, 1}, {1, 4}, {2, 3}, {3, 2}, {4, 1}, {5}
MATHEMATICA
Flatten[ Table[ Reverse[ # ] & /@ Reverse[ Sort[ Flatten[ Permutations[ # ] & /@ Partitions[ n], 1]]], {n, 6}]] (* Robert G. Wilson v, Jun 22 2005 *)
CROSSREFS
Triangles of compositions: A066099 (main entry for compositions; similar to the Mathematica ordering for partitions, A080577), A124734 (similar to the Abramowitz & Stegun ordering for partitions, A036036), and this sequence (similar to the Maple partition ordering, A080576), A296772.
Sequence in context: A362833 A228369 A296773 * A277824 A265120 A329621
KEYWORD
nonn,tabf
AUTHOR
Hugo van der Sanden, Jun 20, 2005
EXTENSIONS
More terms from Robert G. Wilson v, Jun 22 2005
Name corrected by Andrey Zabolotskiy, May 18 2018
STATUS
approved