%I #40 Feb 08 2024 10:44:47
%S 1,6,10,11,3,16,21,23,22,31,100,26,87,51,41,73,69,66,63,36,58,101,97,
%T 52,5,102,103,46,79,61,107,76,192,151,81,38,201,89,164,35,59,34,173,
%U 126,99,184,74,135,153,7,167,176,29,251,121,28,168,148,27,56,92,123,137,57,141,207,25,113
%N a(n) is the smallest positive integer not yet appearing in the sequence such that n*a(n) contains n as a substring.
%H Scott R. Shannon, <a href="/A333410/b333410.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A333410/a333410.gp.txt">PARI program for A333410</a>
%e a(2) = 6 as 6 has not appeared previously and 2 * 6 = 12 which contains '2' as a substring.
%e a(6) = 16 as 16 has not appeared previously and 6 * 16 = 96 which contains '6' as a substring.
%e a(7) = 21 as 21 has not appeared previously and 7 * 21 = 147 which contains '7' as a substring.
%o (PARI) See Links section.
%o (Python)
%o from itertools import count, islice
%o def agen(): # generator of terms
%o s, mink, aset, concat = 1, 2, {1}, "1"
%o yield from [1]
%o for n in count(2):
%o an, sn = mink, str(n)
%o while an in aset or not sn in str(n*an): an += 1
%o aset.add(an); s += an; concat += str(an); yield an
%o while mink in aset: mink += 1
%o print(list(islice(agen(), 68))) # _Michael S. Branicky_, Feb 08 2024
%Y Cf. A086064, A333774, A333775, A333811, A332795, A332703.
%K nonn,base
%O 1,2
%A _Scott R. Shannon_, Apr 11 2020