OFFSET
1,2
LINKS
Carole Dubois, Table of n, a(n) for n = 1..5000
EXAMPLE
The sequence starts with 1, 10, 2, 13, 12, 3,... and we see indeed that a(2) = 10 is the smallest available integer showing a digit 1 as a(1) = 1 must be divisible by one and only one digit of a(2); in the same manner we have a(3) = 2 and we see that a(4) cannot be 11 [because two digits of 11 would divide 2] or 12 [again, the two digits of 12 divide 2]; thus a(4)= 13, etc.
PROG
(Python)
from itertools import count, islice
def cond(an, k):
return 1 == sum(1 for d in map(int, str(k)) if d and an%d == 0)
def agen(): # generator of terms
an, m, aset = 1, 2, set()
while True:
yield an
aset.add(an)
digs = set(map(int, str(an)))
an = next(k for k in count(m) if k not in aset and cond(an, k))
while m in aset: m += 1
print(list(islice(agen(), 77))) # Michael S. Branicky, May 04 2026
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 06 2019
STATUS
approved
