OFFSET
1,2
COMMENTS
Inspired by A332268.
A number that is divisible by the product of its digits is called Zuckerman number (A007602); e.g., 24 is a Zuckerman number because it is divisible by 2*4=8 (see links).
a(n) = 1 iff n = 1 or n is prime not repunit >= 13.
a(n) = 2 iff n is prime = 2, 3, 5, 7 or a prime repunit.
Numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 24, 111111111111111111111 (repunit with 19 times 1's) have all divisors Zuckerman numbers. The sequence of numbers with all Zuckerman divisors is infinite iff there are infinitely many repunit primes (see A004023).
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
Giovanni Resta, Zuckerman numbers, Numbers Aplenty.
GĂ©rard Villemin, Nombres de Zuckerman, Types de nombres.
FORMULA
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{n>=1} 1/A007602(n) = 3.26046... . - Amiram Eldar, Jan 01 2024
EXAMPLE
For n = 4, the divisors are 1, 2, 4 and they are all Zuckerman numbers, so a(4) = 3.
For n = 14, the divisors are 1, 2, 7 and 14. Only 1, 2 and 7 are Zuckerman numbers, so a(14) = 3.
MATHEMATICA
zuckQ[n_] := (prodig = Times @@ IntegerDigits[n]) > 0&& Divisible[n, prodig]; a[n_] := Count[Divisors[n], _?(zuckQ[#] &)]; Array[a, 100] (* Amiram Eldar, Jun 03 2020 *)
PROG
(PARI) iszu(n) = my(p=vecprod(digits(n))); p && !(n % p);
a(n) = sumdiv(n, d, iszu(d)); \\ Michel Marcus, Jun 03 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jun 03 2020
STATUS
approved