OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems: Inversion of Multiplicative Functions (invphi.gp).
EXAMPLE
a(1) = 4 since sigma(3) = 4 = 2^2.
MAPLE
with(numtheory); egcd := proc(n) local L; if n>1 then L:=ifactors(n)[2]; L:=map(z->z[2], L); return igcd(op(L)) else return 1 fi; end; L:=[]: P:={}: for w to 1 do for n from 1 to 10000 do s:=sigma(n); if egcd(s)>1 then print(n, s, ifactor(s)); L:=[op(L), n]; P:=P union {s}; fi od od; L; P;
MATHEMATICA
powerQ[n_] := Block[{pf = FactorInteger@ n, min}, min = Min @@ Last /@ pf; min > 1 && AllTrue[Last /@ pf/min, IntegerQ]]; lim = 10000; Intersection[Select[Range@ lim, powerQ], DeleteDuplicates@ Sort[DivisorSigma[1, #] & /@ Range@ lim]] (* Michael De Vlieger, Mar 10 2015 *)
PROG
(Magma) Set(Sort([SumOfDivisors(k): k in[1..10000], b in [2..15], a in [2..100] | SumOfDivisors(k) eq a^b])); // Jaroslav Krizek, Mar 10 2015
(Magma) Set(Sort([SumOfDivisors(k): k in[A065496(n)]])); // Jaroslav Krizek, Mar 10 2015
(PARI) is(n) = ispower(n) && invsigmaNum(n) > 0; \\ Amiram Eldar, Aug 02 2024, using Max Alekseyev's invphi.gp
CROSSREFS
KEYWORD
nonn
AUTHOR
Walter Kehowski, Dec 01 2006
STATUS
approved