OFFSET
0,2
PROG
(Python)
from itertools import product
def cf(s):
for l in range(1, len(s)//3 + 1):
for i in range(len(s) - 3*l + 1):
if s[i:i+l]*2 == s[i+l:i+3*l]: return False
return True
def a(n):
if n == 0: return 1
return 5*sum(cf("0"+"".join(w)) for w in product("01234", repeat=n-1))
print([a(n) for n in range(0, 10)]) # Michael S. Branicky, Apr 16 2021
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Sascha Kurz, Mar 22 2002
EXTENSIONS
a(0) prepended and a(14)-a(15) by Michael S. Branicky, Apr 16 2021
STATUS
approved