editing
approved
editing
approved
(Python)
from itertools import count, islice
m = {'0':'12', '1':'024', '2':'0135', '3':'26', '4':'157', '5':'2468', '6':'359', '7':'48', '8':'579', '9':'68'}
def c(r): return (r=='0' or r[0]!='0') and not ("102" in r or "201" in r)
def agen():
reach = list("0123456789")
for d in count(1):
yield from (int(r) for r in reach if c(r))
reach = [r + s for r in reach for s in m[r[-1]]]
print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 05 2022
(Python)
from itertools import count, islice
m = {'0':'12', '1':'024', '2':'0135', '3':'26', '4':'157', '5':'2468', '6':'359', '7':'48', '8':'579', '9':'68'}
def c(r): return (r=='0' or r[0]!='0') and not ("102" in r or "201" in r)
def agen():
reach = list("0123456789")
for d in count(1):
yield from (int(r) for r in reach if c(r))
reach = [r + s for r in reach for s in m[r[-1]]]
print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 05 2022
approved
editing
proposed
approved
editing
proposed
(Python)
from itertools import count, islice
m = {'0':'12', '1':'024', '2':'0135', '3':'26', '4':'157', '5':'2468', '6':'359', '7':'48', '8':'579', '9':'68'}
def c(r): return (r=='0' or r[0]!='0') and not ("102" in r or "201" in r)
def agen():
reach = list("0123456789")
for d in count(1):
yield from (int(r) for r in reach if c(r))
reach = [r + s for r in reach for s in m[r[-1]]]
print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 05 2022
approved
editing
editing
approved
A 10-automatic sequence. - Charles R Greathouse IV, Aug 01 2012
<a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed