cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239017 List of primitive words on {1,2,3}.

This page as a plain text file.
%I A239017 #17 Mar 10 2014 01:22:27
%S A239017 1,2,3,12,13,21,23,31,32,112,113,121,122,123,131,132,133,211,212,213,
%T A239017 221,223,231,232,233,311,312,313,321,322,323,331,332,1112,1113,1121,
%U A239017 1122,1123,1131,1132,1133,1211,1213,1221,1222,1223,1231,1232,1233,1311,1312,1321,1322,1323,1331,1332,1333,2111,2112,2113,2122,2123
%N A239017 List of primitive words on {1,2,3}.
%C A239017 A word is primitive if it is not a power (i.e., repetition) of a subword. The non-primitive words 11, 22, 33, 111, 222, 333, 1111, 1212, 1313, 2121, 2222, ... (cf. A239018) are excluded here.
%C A239017 This sequence is the complement of A239018 in A007932.
%C A239017 It is the analog for {1,2,3} of A213969 for {1,2}.
%C A239017 The Lyndon words on {1,2,3}, A102660, are the subsequence of these primitive words not larger than any of their "rotations", i.e., in A239016.
%F A239017 A239017 = A007932 \ A239018.
%o A239017 (PARI) is_A239017(n)={fordiv(#d=digits(n),L,L<#d&&d==concat(Col(vector(#d/L,i,1)~*vecextract(d,2^L-1))~)&&return);!setminus(Set(d),[1,2,3])}
%o A239017 for(n=1,5,p=vector(n,i,10^(n-i))~;forvec(d=vector(n,i,[1,3]),is_A239017(m=d*p)&&print1(m",")))
%Y A239017 Cf. A213969 - A213974.
%K A239017 nonn,base
%O A239017 1,2
%A A239017 _M. F. Hasler_, Mar 08 2014