OFFSET
1,1
COMMENTS
Maple and Mathematica programs adapted from A085842.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
The divisors of 8 are {1, 2, 4, 8}. sigma(8) - 8 - 2 = 5, which is prime.
MAPLE
with(numtheory): b := []: for n from 3 to 2000 do t1 := divisors(n); t2 := convert(t1, list); t3 := add(t2[i], i=1..nops(t2)); if isprime(t3-2-n) then b := [op(b), n]; fi; od: b;
MATHEMATICA
f[n_]:=Plus@@Divisors[n]-n-2; lst={}; Do[a=f[n]; If[PrimeQ[a], AppendTo[lst, n]], {n, 7!}]; lst
Select[Range[2, 500], PrimeQ[DivisorSigma[1, #] - # - 2] &] (* Vaclav Kotesovec, Feb 23 2019 *)
PROG
(PARI) isok(n) = isprime(sigma(n) - n - 2); \\ Michel Marcus, Feb 23 2019
(GAP) Filtered([2..330], k->IsPrime(Sigma(k)-k-2)); # Muniru A Asiru, Feb 24 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jan Koornstra, Feb 19 2019
STATUS
approved