

A341434


a(n) is the number of bases 1 < b < n in which n is divisible by its product of digits.


2



0, 0, 1, 1, 1, 2, 2, 3, 2, 2, 1, 5, 2, 3, 4, 6, 1, 5, 1, 5, 4, 4, 1, 9, 2, 2, 4, 5, 1, 7, 3, 9, 4, 2, 3, 12, 1, 2, 3, 10, 1, 7, 2, 7, 7, 2, 1, 15, 2, 5, 3, 6, 1, 10, 3, 10, 4, 3, 1, 14, 1, 2, 7, 14, 3, 8, 1, 6, 3, 6, 1, 20, 2, 3, 8, 7, 3, 7, 1, 16, 7, 2, 1, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,6


LINKS

Amiram Eldar, Table of n, a(n) for n = 1..10000


FORMULA

a(n) > 0 for all numbers n > 2 since n in base b = n1 is 11.
a(n) > 1 for all even numbers > 4 since n in base b = n2 is 12. Similarly, a(n) > 1 for all composite numbers > 4 since if n = k*m, then n is divisible by its product of digits in bases nm and nk.
a(p) > 1 for primes p in A085104.
a(p) > 2 for primes p in A119598 (i.e., 31, 8191, ...).
a(n) >= A088323(n), with equality if n = 4 or if n is a prime.


EXAMPLE

a(3) = 1 since 3 is divisible by its product of digits only in base 2: 3 = 11_2 and 1*1  3.
a(6) = 2 since 6 is divisible by its product of digits in 2 bases: in base 4, 6 = 12_4 and 1*2  6, and in base 5, 6 = 11_5 and 1*1  6.


MATHEMATICA

q[n_, b_] := (p = Times @@ IntegerDigits[n, b]) > 0 && Divisible[n, p]; a[n_] := Count[Range[2, n], _?(q[n, #] &)]; Array[a, 100]


PROG

(PARI) a(n) = sum(b=2, n1, my(x=vecprod(digits(n, b))); x && !(n%x)); \\ Michel Marcus, Feb 12 2021


CROSSREFS

Cf. A007602, A068953, A080221, A085104, A088323, A119598.
Sequence in context: A304199 A251140 A259977 * A115312 A237721 A254296
Adjacent sequences: A341431 A341432 A341433 * A341435 A341436 A341437


KEYWORD

nonn,base


AUTHOR

Amiram Eldar, Feb 11 2021


STATUS

approved



