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.

Showing 1-5 of 5 results.

A213974 List of imprimitive words over the alphabet {2,3}.

Original entry on oeis.org

22, 33, 222, 333, 2222, 2323, 3232, 3333, 22222, 33333, 222222, 223223, 232232, 232323, 233233, 322322, 323232, 323323, 332332, 333333, 2222222, 3333333, 22222222, 22232223, 22322232, 22332233, 23222322, 23232323, 23322332, 23332333, 32223222, 32233223, 32323232, 32333233, 33223322, 33233323, 33323332, 33333333
Offset: 1

Views

Author

N. J. A. Sloane, Jun 30 2012

Keywords

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 each digit 1 by 2, and from A213972 by replacing all digits 2 by 3 and all digits 1 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.

Crossrefs

Programs

  • PARI
    for(n=1, 8, p=vector(n, i, 10^(n-i))~; forvec(d=vector(n, i, [2, 3]), is_A239017(m=d*p)||print1(m", "))) \\ M. F. Hasler, Mar 10 2014

Formula

Equals A032810 intersect A239018. - M. F. Hasler, Mar 10 2014

Extensions

More terms from M. F. Hasler, Mar 10 2014

A213972 List of imprimitive words over the alphabet {1,2}.

Original entry on oeis.org

11, 22, 111, 222, 1111, 1212, 2121, 2222, 11111, 22222, 111111, 112112, 121121, 121212, 122122, 211211, 212121, 212212, 221221, 222222, 1111111, 2222222, 11111111, 11121112, 11211121, 11221122, 12111211, 12121212, 12211221, 12221222, 21112111, 21122112, 21212121
Offset: 1

Views

Author

N. J. A. Sloane, Jun 30 2012

Keywords

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.

Crossrefs

See A239018 for the analog over the alphabet {1,2,3}.

Programs

  • 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 *)
  • 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

Formula

A213972 = A007931 intersect A239018. - M. F. Hasler, Mar 10 2014

Extensions

More terms from M. F. Hasler, Mar 10 2014

A213973 List of imprimitive words over the alphabet {1,3}.

Original entry on oeis.org

11, 33, 111, 333, 1111, 1313, 3131, 3333, 11111, 33333, 111111, 113113, 131131, 131313, 133133, 311311, 313131, 313313, 331331, 333333, 1111111, 3333333, 11111111, 11131113, 11311131, 11331133, 13111311, 13131313, 13311331, 13331333, 31113111, 31133113, 31313131
Offset: 1

Views

Author

N. J. A. Sloane, Jun 30 2012

Keywords

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 A213972 by replacing all digits 2 by 3, and from A213974 by replacing all digits 2 by 1. - 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.

Crossrefs

Programs

  • PARI
    for(n=1, 8, p=2*vector(n, i, 10^(n-i))~; forvec(d=vector(n, i, [1, 3]/2), is_A239017(m=d*p)||print1(m", ")))

Formula

A213973 = A032917 intersect A239018. - M. F. Hasler, Mar 10 2014

Extensions

More terms from M. F. Hasler, Mar 10 2014

A239019 Numbers which are not primitive words over the alphabet {0,...,9} (when written in base 10).

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 111, 222, 333, 444, 555, 666, 777, 888, 999, 1010, 1111, 1212, 1313, 1414, 1515, 1616, 1717, 1818, 1919, 2020, 2121, 2222, 2323, 2424, 2525, 2626, 2727, 2828, 2929, 3030, 3131, 3232, 3333, 3434, 3535, 3636, 3737, 3838, 3939, 4040, 4141, 4242, 4343, 4444, 4545, 4646, 4747, 4848, 4949
Offset: 1

Views

Author

M. F. Hasler, Mar 08 2014

Keywords

Comments

A word is primitive iff it is not a power, i.e., repetition, of a subword. The only non-primitive words with a prime number of letters (here: digits) are the repdigit numbers. Thus, the first nontrivial terms of this sequence are 1010,1212,...
This sequence does *not* contain all non-primitive words over the alphabet {0,...,9}, namely, it excludes those which would be numbers with leading zeros: 00,000,0000,0101,0202,...
Lists of non-primitive words over a sub-alphabet of {1...9}, like A213972, A213973, A213974, A239018, ... are given as intersection of this with the set of all words in that alphabet, e.g., A007931, A032810, A032917, A007932, ...

Programs

  • Maple
    F:= proc(d) local p,R,q;
      R:= {seq(x*(10^d-1)/9, x=1..9)};
      for p in numtheory:-factorset(d) minus {d} do
        q:= d/p;
        R:= R union {seq(x*(10^d-1)/(10^q-1),x=10^(q-1)..10^q-1)};
      od:
      sort(convert(R,list))
    end proc:
    [seq(op(F(i)),i=2..4)]; # Robert Israel, Nov 14 2017
  • PARI
    is_A239019(n)=fordiv(#n=digits(n),L,L<#n && n==concat(Col(vector(#n/L,i,1)~*vecextract(n,2^L-1))~)&&return(1))

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

Original entry on oeis.org

1, 2, 3, 12, 13, 21, 23, 31, 32, 112, 113, 121, 122, 123, 131, 132, 133, 211, 212, 213, 221, 223, 231, 232, 233, 311, 312, 313, 321, 322, 323, 331, 332, 1112, 1113, 1121, 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
Offset: 1

Views

Author

M. F. Hasler, Mar 08 2014

Keywords

Comments

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.
This sequence is the complement of A239018 in A007932.
It is the analog for {1,2,3} of A213969 for {1,2}.
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.

Crossrefs

Programs

  • 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])}
    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",")))

Formula

Showing 1-5 of 5 results.