|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
An example of a sequence which contains all finite sequences of positive integers as subsequences.
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
|
|
|
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.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|