A296978 List of normal sequences ordered first by length and then lexicographically, where a finite sequence is normal if it spans an initial interval of positive integers.
1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 3, 1, 3, 2, 2, 1, 1, 2, 1, 2, 2, 1, 3, 2, 2, 1, 2, 3, 1, 3, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 3, 1, 1, 3, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 1, 1
Offset: 1
Examples
Triangle of normal sequences begins: 1, 11,12,21, 111,112,121,122,123,132,211,212,213,221,231,312,321.
Programs
-
Mathematica
normseqs[n_]:=Union@@Permutations/@Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]; Array[normseqs,5,1,Join]