OFFSET
1,1
COMMENTS
Numbers k such that both the sum s and product p of the divisors of k are divisible by (p mod s).
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
MAPLE
filter:= proc(n) local d, s, p, r;
d:= numtheory:-divisors(n);
s:= convert(d, `+`);
p:= convert(d, `*`);
r:= p mod s;
r <> 0 and p mod r = 0 and s mod r = 0
end proc:
select(filter, [$1..1000]);
MATHEMATICA
okQ[n_] := Module[{d, s, p, m},
d = Divisors[n];
s = Total[d];
p = Times @@ d;
m = Mod[p, s];
If[m == 0, False, Divisible[s, m] && Divisible[p, m]]];
Select[Range[1000], okQ] (* Jean-François Alcover, May 16 2023 *)
PROG
(PARI) isok(k) = my(d=divisors(k), s=vecsum(d), p=vecprod(d), m=p % s); (m>0) && !(s%m) && !(p%m); \\ Michel Marcus, Aug 09 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Aug 08 2021
STATUS
approved