This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A387242 #10 Aug 27 2025 21:59:22 %S A387242 2,42,26,28,102,32,85,172,95,20,22,242,26,28,302,32,85,236,95,402,42, %T A387242 442,115,482,502,522,162,562,145,260,62,1615,266,268,712,272,148,772, %U A387242 278,802,82,842,215,882,902,92,235,962,245,1002,102,1042,265,1078,1102,112,285,1162 %N A387242 a(n) is the least k such that A334676(k) != k and the decimal string of n appears in A334676(k). %e A387242 A334676(242) = 121, the first term whose decimal expansion contains the substring "12"; hence a(12) = 242. %e A387242 A334676(21) = A334676(42) = 21 contains "2" but a(2) = 42 since the first does not satisfy A334676(k) != k. %o A387242 (Python) # uses A334676() and neighs() from A334676 %o A387242 from itertools import count, islice %o A387242 def subs(s): yield from (s[i:j] for i in range(len(s)) for j in range(i+1, len(s)+1)) %o A387242 def agen(): # generator of terms %o A387242 adict, n = dict(), 1 %o A387242 for k in count(1): %o A387242 v = A334676(k) %o A387242 if v != k: %o A387242 for t in subs(str(v)): %o A387242 if (ti:=int(t)) not in adict: %o A387242 adict[ti] = k %o A387242 while n in adict: %o A387242 yield adict[n] %o A387242 n += 1 %o A387242 print(list(islice(agen(), 70))) # _Michael S. Branicky_, Aug 23 2025 %Y A387242 Cf. A334676. %K A387242 nonn,base,new %O A387242 1,1 %A A387242 _Ali Sada_, Aug 23 2025