A332268 a(n) is the number of divisors of n that are Niven numbers.
1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 1, 6, 1, 3, 3, 4, 1, 6, 1, 6, 4, 2, 1, 8, 2, 2, 4, 4, 1, 7, 1, 4, 2, 2, 3, 9, 1, 2, 2, 8, 1, 7, 1, 3, 5, 2, 1, 9, 2, 5, 2, 3, 1, 8, 2, 5, 2, 2, 1, 11, 1, 2, 6, 4, 2, 4, 1, 3, 2, 6, 1, 12, 1, 2, 3, 3, 2, 4, 1, 9, 5, 2, 1, 10, 2, 2
Offset: 1
Examples
For n = 4 the divisors are 1, 2, 4 and they are all Niven numbers, so a(4) = 3. For n = 14 the divisors are 1, 2, 7 and 14. Only 1, 2 and 7 are Niven numbers, so a(14) = 3.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[#[d:d in Divisors(k)|d mod &+Intseq(d) eq 0]:k in [1..100]];
-
Mathematica
a[n_] := DivisorSum[n, 1 &, Divisible[#, Plus @@ IntegerDigits[#]] &]; Array[a, 100] (* Amiram Eldar, May 04 2020 *)
-
PARI
a(n) = sumdiv(n, d, !(d % sumdigits(d))); \\ Michel Marcus, May 04 2020
Formula
a(A333456(n)) = n. - Bernard Schott, Jul 30 2022
Comments