login
A389116
a(1) = 1; for n > 1, a(n) is the least number not already in the sequence that is a multiple of the smallest nonzero digit of a(n-1).
1
1, 2, 4, 8, 16, 3, 6, 12, 5, 10, 7, 14, 9, 18, 11, 13, 15, 17, 19, 20, 22, 24, 26, 28, 30, 21, 23, 32, 34, 27, 36, 33, 39, 42, 38, 45, 40, 44, 48, 52, 46, 56, 25, 50, 35, 51, 29, 54, 60, 66, 72, 58, 55, 65, 70, 49, 64, 68, 78, 63, 57, 75, 80, 88, 96, 84, 76, 90, 81, 31, 37, 69, 102, 41
OFFSET
1,2
LINKS
EXAMPLE
a(14) = 18 and its least digit is 1. The least multiple of 1 that has not appeared in the sequence yet is 11, so a(15) = 11.
MATHEMATICA
s={1}; Do[i=1; d=Union[IntegerDigits[s[[-1]]]]; m=If[d[[1]]>0, d[[1]], d[[2]]]; Until[!MemberQ[s, i]&&Mod[i, m]==0, i++]; AppendTo[s, i], {k, 73}]; s (* James C. McMahon, Nov 03 2025 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
an, aset, m = 1, {1}, {i:i for i in range(1, 10)}
while True:
yield an
small = int(min(d for d in str(an) if d > '0'))
an = next(k for k in count(m[small], small) if k not in aset)
m[small] = an
aset.add(an)
print(list(islice(agen(), 74)))
CROSSREFS
Cf. A390054.
Sequence in context: A373944 A218338 A218468 * A308539 A036122 A050124
KEYWORD
nonn,base
AUTHOR
Michael S. Branicky and Ali Sada, Oct 28 2025
STATUS
approved