OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
EXAMPLE
usigma(1) = (-1)sigma(1) = 1;
usigma(4) = (-1)sigma(4) = 5;
usigma(15867) = (-1)sigma(15867) = 18480; etc.
MAPLE
with(numtheory): P:=proc(q) local a, b, d, k, n;
a:=0; for n from 1 to q do a:=divisors(n); d:=0; for k from 1 to nops(a)
do if gcd(a[k], n/a[k])=1 then d:=d+a[k]; fi; od; a:=ifactors(n)[2]; b:=1;
for k from 1 to nops(a) do b:=b*(-1+sum(a[k][1]^j, j=1..a[k][2])); od;
if b=d then print(n); fi; od; end: P(10^9);
MATHEMATICA
aQ[n_] := Module[{f = FactorInteger[n]}, p = f[[;; , 1]]; e = f[[;; , 2]]; Times@@(p^e+1) == Times@@((p^(e+1)-2*p+1)/(p-1))]; Join[{1}, Select[Range[2, 200000 ], aQ]] (* Amiram Eldar, Jun 23 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, May 20 2015
STATUS
approved