OFFSET
1,3
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
MATHEMATICA
Prepend[Cases[Range[329], n_ /; NoneTrue[Range[2, (Sqrt[4 n - 3] - 1)/2], MatchQ[IntegerDigits[n, #], {___, d_, d_, d_, ___}] &]], 0] (* Vladimir Reshetnikov, Mar 20 2022 *)
PROG
(Python)
from sympy.ntheory.digits import digits
def three_in_a_row(s):
return any(s[i] == s[i+1] == s[i+2] for i in range(len(s) - 2))
def ok(n):
if n < 7: return True
b = 2
d = digits(n, b)[1:]
while len(d) >= 3:
if three_in_a_row(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
base,nonn
AUTHOR
Joonas Pohjonen, Jun 22 2010
STATUS
approved