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.
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, 14, 29, 10, 31, 16, 11, 34, 1, 1, 37, 38, 13, 10, 41, 21, 43, 11, 1, 46, 47, 1, 49, 10, 51, 13, 53, 54, 11, 56, 57, 58, 59, 10, 61, 31, 21, 16, 13, 11, 67, 68, 69
Offset: 1
Examples
For n = 168: - 168 / 6 = 28, 28 / 2 = 14, - 168 / 8 = 21, - so a(168) = 14.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
Programs
-
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]", "))
-
Python
def neighs(x): yield from (x//d for d in list(map(int, str(x))) if d > 0 and x%d == 0) def A334676(n): reach, expand = {n}, [n] while expand: q = expand.pop() for r in neighs(q): if r not in reach: reach.add(r) expand.append(r) return min(reach) print([A334676(n) for n in range(1, 70)]) # Michael S. Branicky, Aug 23 2025
Formula
a(a(n)) = a(n).
Comments