Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #28 Jun 23 2024 08:38:54
%S 1,3,12,36,612,1836,168912,10810368,16366897152,51703028103168,
%T 1563447866811697152,23520172003575940628103168,
%U 1155558163424267804668132116971520,12369352104691609178206055357839959406281031680
%N 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.
%C It is unknown whether a(n+1)/a(n) -> oo as n -> oo.
%C 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.
%H Kevin Ryde, <a href="/A372880/a372880.c.txt">C Code</a>
%F 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
%e a(7) = 168912; 16812 = 92*1836 = 92*a(6) and "16812" contains a(5) = 612 as a subsequence.
%o (Python)
%o def subseq(x,y):
%o i = 0
%o j = 0
%o while i != len(x) and j != len(y):
%o if x[i] == y[j]:
%o i += 1
%o j += 1
%o return i == len(x)
%o def a(n):
%o if n == 1:
%o return 1
%o A = 1
%o B = 3
%o for _ in range(n-2):
%o s = str(A)
%o i = 1
%o while not subseq(s, str(B*i)):
%o i += 1
%o A, B = B, B*i
%o return B
%o (Python)
%o from itertools import count, islice
%o def is_subseq(s, p):
%o while s and p:
%o if p%10 == s%10: s //= 10
%o p //= 10
%o return s == 0
%o def agen(): # generator of terms
%o an2, an1 = [1, 3]
%o yield from [an2, an1]
%o while True:
%o an = next(i*an1 for i in count(1) if is_subseq(an2, i*an1))
%o an2, an1 = an1, an
%o yield an
%o print(list(islice(agen(), 11))) # _Michael S. Branicky_, May 15 2024
%o (C) /* See links. */
%Y Cf. A004643.
%K nonn,base,more
%O 1,2
%A _Bryle Morga_, May 15 2024
%E a(12)-a(13) from _Michael S. Branicky_, May 15 2024
%E a(14) from _Kevin Ryde_, Jun 23 2024