login
A334684
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.
2
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, 14, 29, 10, 31, 16, 11, 34, 7, 6, 37, 38, 13, 10, 41, 21, 43, 11, 9, 46, 47, 6, 49, 10, 51, 13, 53, 54, 11, 56, 57, 58, 59, 10, 61, 31, 21, 16, 13, 11, 67, 68, 69
OFFSET
1,2
LINKS
FORMULA
a(a(n)) = n.
a(10*k) <= 10 for any k > 0.
a(5^k) = 5 for any k > 0.
a(p) = p for any prime number p.
EXAMPLE
For n = 140:
- 140 / 4 = 35, 35 / 5 = 7,
- 140 / 14 = 10,
- so a(140) = 7.
PROG
(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..#s-1]); print1 (a[n]", ")) }
CROSSREFS
See A334676 for a similar sequence.
Sequence in context: A278063 A375931 A373231 * A062759 A327526 A121758
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 25 2020
STATUS
approved