OFFSET
1,2
COMMENTS
A Niven number (A005349) is a number that is divisible by the sum of its digits; e.g., 12 is a Niven number because it's divisible by 1 + 2.
The divisor 1 is trivially a Niven number. For a number n, the divisor n itself is considered
Conjecture: For every n there is at least one number k with n divisors Niven numbers.
Not all terms in the sequence are Niven numbers. For example: a(85) = 85680 has digsum(85680) = 27 and 85680/27 = 3173.33 ...
Also, a(152) = 856800, a(159) = 887040, a(161) = 2096640.
The number of non-Niven terms can be infinite.
LINKS
David A. Corneth, Table of n, a(n) for n = 1..297
David A. Corneth, Some upper bounds
EXAMPLE
Of the divisors of 45, only five are Niven numbers: 1, 3, 5, 9, and 45.
Number 12 has all six divisors 1, 2, 3, 4, 6 and 12 that are Niven numbers.
MATHEMATICA
numDiv[n_] := DivisorSum[n, 1 &, Divisible[#, Plus @@ IntegerDigits[#]] &]; a[n_] := Module[{k = 1}, While[numDiv[k] != n, k++]; k]; Array[a, 50] (* Amiram Eldar, May 04 2020 *)
PROG
(Magma) a:=[]; for n in [1..50] do m:=1; while #[d:d in Divisors(m)|d mod &+Intseq(d) eq 0] ne n do m:=m+1; end while; Append(~a, m); end for; a;
(PARI) f(n) = sumdiv(n, d, !(d % sumdigits(d))); \\ A332268
a(n) = my(k=1); while (f(k) != n, k++); k; \\ Michel Marcus, May 04 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, May 03 2020
STATUS
approved