OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7) = 8, a(8) = 210, a(9) = 21; the three terms follow the even/even/odd pattern and so do their digits: 8/2/1 and 0/2/1.
PROG
(Python)
from itertools import count, islice, repeat
def c(s, i):
return all(int(d)%2 == int((i+j)%3 == 2) for j, d in enumerate(s))
def agen(): # generator of terms
seen, s = set(), 0
for n in count(0):
eo = int(n%3 == 2)
an = next(k for k in count(eo, 2) if k not in seen and c(str(k), s))
yield an
seen.add(an)
s += len(str(an))
print(list(islice(agen(), 99))) # Michael S. Branicky, Aug 11 2024
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini, Aug 11 2024
STATUS
approved