login
A387242
a(n) is the least k such that A334676(k) != k and the decimal string of n appears in A334676(k).
0
2, 42, 26, 28, 102, 32, 85, 172, 95, 20, 22, 242, 26, 28, 302, 32, 85, 236, 95, 402, 42, 442, 115, 482, 502, 522, 162, 562, 145, 260, 62, 1615, 266, 268, 712, 272, 148, 772, 278, 802, 82, 842, 215, 882, 902, 92, 235, 962, 245, 1002, 102, 1042, 265, 1078, 1102, 112, 285, 1162
OFFSET
1,1
EXAMPLE
A334676(242) = 121, the first term whose decimal expansion contains the substring "12"; hence a(12) = 242.
A334676(21) = A334676(42) = 21 contains "2" but a(2) = 42 since the first does not satisfy A334676(k) != k.
PROG
(Python) # uses A334676() and neighs() from A334676
from itertools import count, islice
def subs(s): yield from (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1))
def agen(): # generator of terms
adict, n = dict(), 1
for k in count(1):
v = A334676(k)
if v != k:
for t in subs(str(v)):
if (ti:=int(t)) not in adict:
adict[ti] = k
while n in adict:
yield adict[n]
n += 1
print(list(islice(agen(), 70))) # Michael S. Branicky, Aug 23 2025
CROSSREFS
Cf. A334676.
Sequence in context: A076391 A348773 A393592 * A130201 A076392 A291173
KEYWORD
nonn,base
AUTHOR
Ali Sada, Aug 23 2025
STATUS
approved