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 A334676 #39 Aug 23 2025 12:36:06 %S A334676 1,1,1,1,1,1,1,1,1,10,11,1,13,14,1,16,17,18,19,10,21,11,23,1,1,13,27, %T A334676 14,29,10,31,16,11,34,1,1,37,38,13,10,41,21,43,11,1,46,47,1,49,10,51, %U A334676 13,53,54,11,56,57,58,59,10,61,31,21,16,13,11,67,68,69 %N A334676 a(n) is the least number that can be reached starting from n and iterating the nondeterministic map x -> x/d where d is a nonzero digit of x dividing x. %C A334676 See A336580 for the positions of 1's. %H A334676 Rémy Sigrist, <a href="/A334676/b334676.txt">Table of n, a(n) for n = 1..10000</a> %F A334676 a(a(n)) = a(n). %e A334676 For n = 168: %e A334676 - 168 / 6 = 28, 28 / 2 = 14, %e A334676 - 168 / 8 = 21, %e A334676 - so a(168) = 14. %o A334676 (PARI) for (n=1, #a=vector(69, k, k), apply (d -> a[n]=min(a[n], a[n/d]), setintersect(Set(digits(n)), divisors(n))); print1 (a[n]", ")) %o A334676 (Python) %o A334676 def neighs(x): %o A334676 yield from (x//d for d in list(map(int, str(x))) if d > 0 and x%d == 0) %o A334676 def A334676(n): %o A334676 reach, expand = {n}, [n] %o A334676 while expand: %o A334676 q = expand.pop() %o A334676 for r in neighs(q): %o A334676 if r not in reach: %o A334676 reach.add(r) %o A334676 expand.append(r) %o A334676 return min(reach) %o A334676 print([A334676(n) for n in range(1, 70)]) # _Michael S. Branicky_, Aug 23 2025 %Y A334676 See A334684 for a similar sequence. %Y A334676 Cf. A336580. %K A334676 nonn,base,changed %O A334676 1,10 %A A334676 _Rémy Sigrist_, Jul 25 2020