OFFSET
1,3
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Cubefree Word.
MATHEMATICA
Prepend[Cases[Range[330], n_ /; NoneTrue[Range[2, (Sqrt[4 n - 3] - 1)/2], MatchQ[IntegerDigits[n, #], {___, d__, d__, d__, ___}] &]], 0]
PROG
(Python)
from sympy.ntheory.digits import digits
def hascube(s):
for l in range(1, len(s)//3 + 1):
for i in range(len(s) - 3*l + 1):
if s[i:i+l] == s[i+l:i+2*l] == s[i+2*l:i+3*l]: return True
return False
def ok(n):
if n < 7: return True
b = 2
d = digits(n, b)[1:]
while len(d) >= 3:
if hascube(d):
return False
b += 1
d = digits(n, b)[1:]
return True
print([k for k in range(331) if ok(k)]) # Michael S. Branicky, Mar 27 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vladimir Reshetnikov, Mar 20 2022
STATUS
approved