|
EXAMPLE
|
1, 2, 3, 1, 2, 3, 1 contains as a subsequence all of 123, ..., 321 and is minimal, so a(3) = 7.
The following is a sequence of length a(5)=19 with terms from 1,2,...,5 that contains as subsequences all of the 120 permutations of 1,2,...,5:
{1,2,3,4,5,1,2,3,4,1,5,2,3,1,4,2,3,5,1}
The proof is shown here:
{1,2,3,4,5,-,-,-,-,-,-,-,-,-,-,-,-,-,-}
{1,2,3,-,5,-,-,-,4,-,-,-,-,-,-,-,-,-,-}
{1,2,-,4,-,-,-,3,-,-,5,-,-,-,-,-,-,-,-}
{1,2,-,4,5,-,-,3,-,-,-,-,-,-,-,-,-,-,-}
{1,2,-,-,5,-,-,3,4,-,-,-,-,-,-,-,-,-,-}
{1,2,-,-,5,-,-,-,4,-,-,-,3,-,-,-,-,-,-}
{1,-,3,-,-,-,2,-,4,-,5,-,-,-,-,-,-,-,-}
{1,-,3,-,-,-,2,-,-,-,5,-,-,-,4,-,-,-,-}
{1,-,3,4,-,-,2,-,-,-,5,-,-,-,-,-,-,-,-}
{1,-,3,4,5,-,2,-,-,-,-,-,-,-,-,-,-,-,-}
{1,-,3,-,5,-,2,-,4,-,-,-,-,-,-,-,-,-,-}
{1,-,3,-,5,-,-,-,4,-,-,2,-,-,-,-,-,-,-}
{1,-,-,4,-,-,2,3,-,-,5,-,-,-,-,-,-,-,-}
{1,-,-,4,-,-,2,-,-,-,5,-,3,-,-,-,-,-,-}
{1,-,-,4,-,-,-,3,-,-,-,2,-,-,-,-,-,5,-}
{1,-,-,4,-,-,-,3,-,-,5,2,-,-,-,-,-,-,-}
{1,-,-,4,5,-,2,3,-,-,-,-,-,-,-,-,-,-,-}
{1,-,-,4,5,-,-,3,-,-,-,2,-,-,-,-,-,-,-}
{1,-,-,-,5,-,2,3,4,-,-,-,-,-,-,-,-,-,-}
{1,-,-,-,5,-,2,-,4,-,-,-,3,-,-,-,-,-,-}
{1,-,-,-,5,-,-,3,-,-,-,2,-,-,4,-,-,-,-}
{1,-,-,-,5,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