A239018 Non-primitive words on {1,2,3}.
11, 22, 33, 111, 222, 333, 1111, 1212, 1313, 2121, 2222, 2323, 3131, 3232, 3333, 11111, 22222, 33333, 111111, 112112, 113113, 121121, 121212, 122122, 123123, 131131, 131313, 132132, 133133, 211211, 212121, 212212, 213213, 221221, 222222, 223223, 231231, 232232, 232323, 233233, 311311, 312312, 313131, 313313
Offset: 1
Keywords
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10239 (all terms with <= 16 digits)
Programs
-
PARI
for(n=1,7,p=vector(n,i,10^(n-i))~;forvec(d=vector(n,i,[1,3]),is_A239017(m=d*p)||print1(m",")))
-
Python
from sympy import divisors from itertools import product def agentod(maxd): for d in range(2, maxd+1): divs, alld = divisors(d)[:-1], set() for div in divs: for t in product("123", repeat=div): alld.add(int("".join(t*(d//div)))) yield from sorted(alld) print([an for an in agentod(6)]) # Michael S. Branicky, Nov 22 2021
Comments