OFFSET
1,2
COMMENTS
Numbers divisible by the product of their digits are called Zuckerman numbers (A007602).
LINKS
FORMULA
a(n) = n iff n belongs to A007602.
EXAMPLE
For n = 10:
- the divisors of 10 are 1, 2, 5 and 10,
- 5 is divisible by 5 whereas 10 is not divisible by 1*0,
- so a(10) = 5.
PROG
(PARI) a(n) = { fordiv (n, d, my (t=n/d, p=vecprod(digits(t))); if (p && t%p==0, return (t))) }
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Jan 24 2023
STATUS
approved