OFFSET
1,1
COMMENTS
The sequence is infinite because the numbers of the form m = 2*10^(10^k), k >= 1, are terms. Indeed, m is a Niven number, m' = 10^(10^k) + 2*10^k*10^(10^k - 1)*7 = 10^(10^k - 1)*(10 + 140*10^k) = 10^(10^k)*(1 + 14*10^k), digsum(m') = 6 and m' is divisible by 6, so it is a Niven number.
EXAMPLE
MATHEMATICA
nivenQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; d[n_] := n * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Range[2, 512], And @@ nivenQ /@ {#, d[#]} &] (* Amiram Eldar, Nov 20 2021 *)
PROG
(Magma) f:=func<n |n le 1 select 0 else n*(&+[Factorisation(n)[i][2] / Factorisation(n)[i][1]: i in [1..#Factorisation(n)]])>; a:=[]; niven:=func<n|n mod &+Intseq(n) eq 0>; [n:n in [2..520]|niven(n) and niven(Floor(f(n)))];
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Marius A. Burtea, Nov 20 2021
STATUS
approved