A333456 a(n) is the smallest number with exactly n divisors that are Niven numbers.
1, 2, 4, 6, 45, 12, 30, 24, 36, 84, 60, 72, 400, 144, 120, 216, 180, 240, 420, 504, 600, 960, 360, 900, 840, 1200, 1512, 720, 1620, 4500, 1080, 2700, 1800, 3024, 3360, 2880, 3960, 2160, 3240, 5760, 2520, 6720, 4320, 5400, 9360, 7920, 7200, 6480, 13860, 8640
Offset: 1
Examples
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.
Links
- David A. Corneth, Table of n, a(n) for n = 1..297
- David A. Corneth, Some upper bounds
Programs
-
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;
-
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 *)
-
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
Comments