login
List of normal Lyndon sequences ordered first by length and then lexicographically, where a finite sequence is normal if it spans an initial interval of positive integers.
2

%I #6 Dec 26 2017 17:46:48

%S 1,1,2,1,1,2,1,2,2,1,2,3,1,3,2,1,1,1,2,1,1,2,2,1,1,2,3,1,1,3,2,1,2,1,

%T 3,1,2,2,2,1,2,2,3,1,2,3,2,1,2,3,3,1,2,3,4,1,2,4,3,1,3,2,2,1,3,2,3,1,

%U 3,2,4,1,3,3,2,1,3,4,2,1,4,2,3,1,4,3,2

%N List of normal Lyndon sequences ordered first by length and then lexicographically, where a finite sequence is normal if it spans an initial interval of positive integers.

%C Row n is formed by A060223(n) sequences and has length A296975(n).

%e Triangle of normal Lyndon sequences begins:

%e 1,

%e 12,

%e 112,122,123,132,

%e 1112,1122,1123,1132,1213,1222,1223,1232,1233,1234,1243,1322,1323,1324,1332,1342,1423,1432.

%t LyndonQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And]&&Array[RotateRight[q,#]&,Length[q],1,UnsameQ];

%t normseqs[n_]:=Union@@Permutations/@Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1];

%t Table[Select[normseqs[n],LyndonQ],{n,5}]

%Y Cf. A000670, A019536, A060223, A095684, A185700, A281013, A294859, A296372, A296656, A296818, A296975, A296976.

%K nonn,tabf

%O 1,3

%A _Gus Wiseman_, Dec 22 2017