%I
%S 1,2,3,4,5,6,7,8,9,10,11,6,13,14,3,16,17,18,19,10,21,11,23,6,5,13,27,
%T 14,29,10,31,16,11,34,7,6,37,38,13,10,41,21,43,11,9,46,47,6,49,10,51,
%U 13,53,54,11,56,57,58,59,10,61,31,21,16,13,11,67,68,69
%N 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 proper divisor of x whose decimal representation appears in that of x.
%H Rémy Sigrist, <a href="/A334684/b334684.txt">Table of n, a(n) for n = 1..10000</a>
%F a(a(n)) = n.
%F a(10*k) <= 10 for any k > 0.
%F a(5^k) = 5 for any k > 0.
%F a(p) = p for any prime number p.
%e For n = 140:
%e  140 / 4 = 35, 35 / 5 = 7,
%e  140 / 14 = 10,
%e  so a(140) = 7.
%o (PARI) { for (n=1, #a=vector(69, k, k), d=digits(n); s=setintersect(divisors(n), setbinop((u,v)>fromdigits(d[u..v]), [1..#d])); apply (t > a[n]=min(a[n], a[n/t]), s[1..#s1]); print1 (a[n]", ")) }
%Y See A334676 for a similar sequence.
%K nonn,base
%O 1,2
%A _Rémy Sigrist_, Jul 25 2020
