OFFSET
1,1
COMMENTS
A word w is primitive if it cannot be written as u^k with k>1; otherwise it is imprimitive.
The {0,1} version of this sequence is
00, 11, 000, 111, 0000, 0101, 1010, 1111, 00000, 11111, 000000, 001001, 010010, 010101, 011011, 100100, 101010, 101101, 110110, 111111
but this cannot be included as a sequence in the OEIS since it contains nonzero "numbers" beginning with 0.
This sequence results from A213973 by replacing all digits 3 by 2 and from A213974 by replacing digits 2 by 1 and digits 3 by 2. - M. F. Hasler, Mar 10 2014
REFERENCES
A. de Luca and S. Varricchio, Finiteness and Regularity in Semigroups and Formal Languages, Monographs in Theoretical Computer Science, Springer-Verlag, Berlin, 1999. See p. 10.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
MAPLE
P:= proc(d) option remember; local m, A;
A:= map(t -> (10^d-1)/9 + add(10^s, s = t), combinat:-powerset([$0..d-1]));
for m in numtheory:-divisors(d) minus {d} do
A:= remove(t -> t = (t mod 10^m)*(10^d-1)/(10^m-1), A);
od;
sort(A);
end proc:
IP:= proc(d)
sort([seq(seq(s*(10^d-1)/(10^m-1), s = P(m)), m=numtheory:-divisors(d) minus {d})]);
end proc:
seq(op(IP(d)), d=1..10); # Robert Israel, Mar 24 2017
MATHEMATICA
j[w_, k_] := FromDigits /@ (Flatten[Table[#, {k}]] & /@ w); Flatten@ Table[ Union@ Flatten[ j[Tuples [{1, 2}, #], n/#] & /@ Most@ Divisors@ n], {n, 9}] (* Giovanni Resta, Mar 24 2017 *)
PROG
(PARI) for(n=1, 10, p=vector(n, i, 10^(n-i))~; forvec(d=vector(n, i, [1, 2]), is_A239017(m=d*p)||print1(m", "))) \\ M. F. Hasler, Mar 10 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Jun 30 2012
EXTENSIONS
More terms from M. F. Hasler, Mar 10 2014
STATUS
approved