login
A308609
Lexicographically earliest sequence of distinct terms such that a(n) is divisible by five and only five digits of a(n+1).
1
1, 11111, 101111, 110111, 111011, 111101, 111110, 11112, 11113, 111112, 11114, 11121, 11131, 111113, 111114, 11116, 11117, 111115, 11115, 11119, 111116, 11122, 11211, 11133, 11139, 11311, 111117, 11313, 11191, 111118, 11127, 11331, 11193, 11137, 11171, 111119, 111121, 111131, 111141, 11199, 11333, 11177, 111151, 111161, 111171, 13111
OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..3494 from Carole Dubois)
EXAMPLE
The sequence starts with 1,11111,101111,110111,111011,111101,111110,11112,11113,... and we see indeed that a(2) = 11111 is the smallest available integer showing five digits that divide a(1) = 1; in the same manner we have a(3) = 101111 [the five 1s divide a(2) = 11111], a(4) = 110111 [the five 1s divide a(3) = 101111], a(8) = 11112 [all five digits divide a(7) = 111110], a(9) = 11113 [all five digits divide a(8) = 11112], etc.
PROG
(Python)
from itertools import count, islice
def cond(an, k):
return 5 == sum(1 for d in map(int, str(k)) if d and an%d == 0)
def agen(): # generator of terms
an, aset, m, mdict = 1, set(), 2, dict()
while True:
yield an
aset.add(an)
key = tuple(i for i in range(1, 10) if an%i == 0)
mm = max(mdict[key], m) if key in mdict else m
an = next(k for k in count(mm) if k not in aset and cond(an, k))
mdict[key] = an + 1
while m in aset: m += 1
print(list(islice(agen(), 46))) # Michael S. Branicky, May 04 2026
CROSSREFS
Cf. A326106 [a(n) is not divisible by any digit of a(n+1)], A326107 [a(n) is divisible by one and only one digit of a(n+1)], A326108 [a(n) is divisible by two and only two digits of a(n+1)], A326109 [a(n) is divisible by three and only three digits of a(n+1)] and A326110 [a(n) is divisible by four and only four digits of a(n+1)].
Sequence in context: A347911 A346001 A032735 * A038447 A115834 A115810
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 10 2019
STATUS
approved