login
List of Lyndon words on {1,2,3} sorted first by length and then lexicographically.
8

%I #21 Mar 10 2014 07:07:45

%S 1,2,3,12,13,23,112,113,122,123,132,133,223,233,1112,1113,1122,1123,

%T 1132,1133,1213,1222,1223,1232,1233,1322,1323,1332,1333,2223,2233,

%U 2333,11112,11113,11122,11123,11132,11133,11212,11213,11222,11223,11232

%N List of Lyndon words on {1,2,3} sorted first by length and then lexicographically.

%C A Lyndon word is primitive (not a power of another word) and is earlier in lexicographic order than any of its cyclic shifts.

%H Reinhard Zumkeller, <a href="/A102660/b102660.txt">Table of n, a(n) for n = 1..10000</a>

%H F. Bassino, J. Clement and C. Nicaud, <a href="http://dx.doi.org/10.1016/j.disc.2004.11.002">The standard factorization of Lyndon words: an average point of view</a>, Discrete Math. 290 (2005), 1-25.

%H Reinhard Zumkeller, <a href="/A210585/a210585.hs.txt">Haskell programs for some sequences concerning Lyndon words</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Lyndon_word">Lyndon word</a>

%H <a href="/index/Lu#Lyndon">Index entries for sequences related to Lyndon words</a>

%F Equals A239016 intersect A239017. - _M. F. Hasler_, Mar 09 2014

%o (Haskell) cf. link.

%o (PARI) is_A102660(n)=is_A239016(n)&&is_A239017(n)

%o for(n=1, 5, p=vector(n, i, 10^(n-i))~; forvec(d=vector(n, i, [1, 3]), is_A102660(m=d*p)&&print1(m", "))) \\ _M. F. Hasler_, Mar 09 2014

%Y Cf. A074650, A001037, A102659, A210584, A210585.

%Y Cf. A027376.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_, Feb 03 2005

%E More terms from _John W. Layman_, Jan 24 2006

%E Definition improved by _Reinhard Zumkeller_, Mar 23 2012