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 A351629 #21 Feb 21 2022 23:24:31 %S A351629 1,2,3,10,5,7,11,9,12,4,13,14,6,15,16,17,18,19,100,20,21,101,102,22, %T A351629 23,30,24,8,25,31,103,104,26,27,105,32,28,29,33,70,50,34,35,36,40,41, %U A351629 37,38,39,106,107,108,42,60,43,109,110,51,111,90,52,44,45,53,112,46,113,114,115,54,116,47 %N A351629 a(1) = 1, a(2) = 2 and a(n) is the smallest integer not included earlier whose first digit divides the concatenation a(n-2), a(n-1). %C A351629 The sequence is a permutation of the positive integers. %H A351629 Carole Dubois, <a href="/A351629/b351629.txt">Table of n, a(n) for n = 1..400</a> %H A351629 Michael De Vlieger, <a href="/A351629/a351629.png">Log-log scatterplot of a(n)</a>, n = 1..2^14. %e A351629 a(3) = 3 as 3 is the smallest unused integer whose first digit divides 12; %e A351629 a(4) = 10 as 10 is the smallest unused integer whose first digit divides 23; %e A351629 a(5) = 5 as 5 is the smallest unused integer whose first digit divides 310; %e A351629 a(6) = 7 as 7 is the smallest unused integer whose first digit divides 105; etc. %t A351629 c[_] = 0; u = 1; a[1] = c[1] = 1; a[2] = c[2] = 2; nn = 72; Do[While[c[u] > 0, u++]; k = u; m = a[n - 2]*10^IntegerLength[a[n - 1]] + a[n - 1]; While[Nand[Mod[m, First@ IntegerDigits[k]] == 0, c[k] == 0], k++]; a[n] = k; c[k] = n, {n, 3, nn}]; Array[a[#] &, nn] (* _Michael De Vlieger_, Feb 20 2022 *) %o A351629 (Python) %o A351629 from sympy import divisors %o A351629 def aupton(terms): %o A351629 alst, aset, minunused = [1, 2], {1, 2}, 3 %o A351629 while len(alst) < terms: %o A351629 concat = int(str(alst[-2])+str(alst[-1])) %o A351629 k = minunused %o A351629 while k in aset or concat%int(str(k)[0]): k += 1 %o A351629 an = k; alst.append(an); aset.add(an) %o A351629 while minunused in aset: minunused += 1 %o A351629 return alst %o A351629 print(aupton(72)) # _Michael S. Branicky_, Feb 20 2022 %Y A351629 Cf. A085946. %K A351629 base,nonn %O A351629 1,2 %A A351629 _Eric Angelini_ and _Carole Dubois_, Feb 20 2022