login
A326107
Lexicographically earliest sequence of distinct terms such that a(n) is divisible by one and only one digit of a(n+1).
6
1, 10, 2, 13, 12, 3, 14, 7, 15, 5, 16, 4, 17, 18, 6, 19, 21, 23, 31, 41, 51, 30, 20, 26, 24, 8, 25, 35, 27, 9, 29, 61, 71, 81, 32, 34, 28, 37, 91, 47, 100, 40, 38, 42, 39, 36, 45, 43, 102, 46, 52, 48, 49, 57, 53, 103, 104, 54, 56, 58, 62, 72, 59, 105, 50, 65, 75, 63, 67, 106, 82, 92, 64, 68, 74, 107, 108
OFFSET
1,2
LINKS
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
Cf. A326106 [a(n) is not divisible by any 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: A084461 A367811 A364188 * A005483 A397297 A228276
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jun 06 2019
STATUS
approved