login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A372880
a(1) = 1; a(2) = 3; for n > 2, a(n) is the smallest proper multiple of a(n-1) that contains a(n-2) as subsequence of its digits.
1
1, 3, 12, 36, 612, 1836, 168912, 10810368, 16366897152, 51703028103168, 1563447866811697152, 23520172003575940628103168, 1155558163424267804668132116971520, 12369352104691609178206055357839959406281031680
OFFSET
1,2
COMMENTS
It is unknown whether a(n+1)/a(n) -> oo as n -> oo.
The same rule starting from terms 1, 2 gives A004643 and its multiples are as easy as A004643(n+1)/A004643(n) = 2 or 5 alternately.
FORMULA
a(n) <= a(n-2)*10^k + (a(n-1) - (a(n-2)*10^k mod a(n-1))), where k is the number of decimal digits in a(n-1). - Michael S. Branicky, May 17 2024
EXAMPLE
a(7) = 168912; 16812 = 92*1836 = 92*a(6) and "16812" contains a(5) = 612 as a subsequence.
PROG
(Python)
def subseq(x, y):
i = 0
j = 0
while i != len(x) and j != len(y):
if x[i] == y[j]:
i += 1
j += 1
return i == len(x)
def a(n):
if n == 1:
return 1
A = 1
B = 3
for _ in range(n-2):
s = str(A)
i = 1
while not subseq(s, str(B*i)):
i += 1
A, B = B, B*i
return B
(Python)
from itertools import count, islice
def is_subseq(s, p):
while s and p:
if p%10 == s%10: s //= 10
p //= 10
return s == 0
def agen(): # generator of terms
an2, an1 = [1, 3]
yield from [an2, an1]
while True:
an = next(i*an1 for i in count(1) if is_subseq(an2, i*an1))
an2, an1 = an1, an
yield an
print(list(islice(agen(), 11))) # Michael S. Branicky, May 15 2024
(C) /* See links. */
CROSSREFS
Cf. A004643.
Sequence in context: A064028 A326241 A110950 * A102744 A145951 A083215
KEYWORD
nonn,base,more
AUTHOR
Bryle Morga, May 15 2024
EXTENSIONS
a(12)-a(13) from Michael S. Branicky, May 15 2024
a(14) from Kevin Ryde, Jun 23 2024
STATUS
approved