Hide answer
To make sequences of 4 numbers, we can insert 4s into three different places in the length 3 sequences given to obtain:
- 4, 3, 2, 1
- 3, 2, 4, 1
- 3, 2, 1, 4
- 4, 1, 3, 2
- 1, 4, 3, 2
- 1, 3, 2, 4
- 4, 2, 1, 3
- 2, 4, 1, 3
- 2, 1, 4, 3
There are some possibilities missing: those containing \(i, 4, i+1\). These can be found by taking the sequences of length 2, picking a number \(i\), adding 1 to every number larger than \(i\), then replacing \(i\) with \(i\ 4\ i+1\).
- 2, 1 → 3, 1 → 3, 1, 4, 2
- 2, 1 → 2, 1 → 2, 4, 3, 1
This gives a total of 3×3+2×1=11 sequences for 4 numbers.
To make sequences with 5 numbers, we can insert 5s into four different places in the length 4 sequences. This gives 4×11=44 sequences.
The missing sequences can then be found by taking the sequences of length 3, then doing the same process as above:
- 3, 2, 1 → 3, 2, 1 → 3, 5, 4, 2, 1
- 3, 2, 1 → 4, 2, 1 → 4, 2, 5, 3, 1
- 3, 2, 1 → 4, 3, 1 → 4, 3, 1, 5, 2
- 1, 3, 2 → 1, 4, 3 → 1, 5, 2, 4, 3
- 1, 3, 2 → 1, 3, 2 → 1, 3, 5, 4, 2
- 1, 3, 2 → 1, 4, 2 → 1, 4, 2, 5, 3
- 2, 1, 3 → 2, 1, 4 → 2, 5, 3, 1, 4
- 2, 1, 3 → 3, 1, 4 → 3, 1, 5, 2, 4
- 2, 1, 3 → 2, 1, 3 → 2, 1, 3, 5, 4
There are 3×3=9 of these, giving 44+9 = 53 total sequences of length 5.
To make sequences with 6 numbers, we can insert 6s into five different places in the length 5 sequences. This gives 5×53=265 sequences.
We can also make sequence by picking a number to replace in the length 4 sequences. This gives 4×11=44 more sequences.
Therefore there are 265+44 = 309 sequences in total.