OFFSET
1,2
LINKS
Carole Dubois, Table of n, a(n) for n = 1..5000
EXAMPLE
The sequence starts with 1, 1111, 10111, 11011, 1117,... and we see indeed that a(2) = 1111 is the smallest available integer showing four digits that divide a(1) = 1; in the same manner we have a(3) = 10111 [the four 1s divide a(2) = 1111], a(4) = 11011 [the four 1s divide a(3) = 10111], a(5) = 1117 [all four digits divide 11011], etc.
PROG
(Python)
from itertools import count, islice
def cond(an, k):
return 4 == 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)
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(), 43))) # Michael S. Branicky, May 04 2026
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 06 2019
STATUS
approved
