OFFSET
1,2
COMMENTS
EXAMPLE
The 8 divisors of 24 are all Niven numbers, and also, 24 is the smallest integer that has at least 8 divisors that are Niven numbers, hence 24 is a term.
MATHEMATICA
s[n_] := DivisorSum[n, 1 &, Divisible[#, Plus @@ IntegerDigits[#]] &]; smax = 0; seq = {}; Do[s1 = s[n]; If[s1 > smax, smax = s1; AppendTo[seq, n]], {n, 1, 10^6}]; seq (* Amiram Eldar, Jan 14 2021 *)
PROG
(PARI) f(n) = sumdiv(n, d, !(d % sumdigits(d))); \\ A332268
lista(nn) = {my(m=0); for (n=1, nn, my(x = f(n)); if (x > m, m = x; print1(n, ", ")); ); } \\ Michel Marcus, Jan 14 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Jan 14 2021
EXTENSIONS
More terms from Amiram Eldar, Jan 14 2021
STATUS
approved