OFFSET
1,1
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
The divisors of 18 are { 1, 2, 3, 6, 9, 18}, and (2 + 6 + 18) - (1 + 3 + 9) = 13 is prime. Hence 18 is in the sequence.
MAPLE
with(numtheory):for n from 2 by 2 to 200 do:x:=divisors(n):n1:=nops(x):s1:=0:s2:=0:for m from 1 to n1 do:if irem(x[m], 2)=1 then s1:=s1+x[m]:else s2:=s2+x[m]:fi:od: if type(s2-s1, prime)=true then printf(`%d, `, n): else fi:od:
MATHEMATICA
f[n_] := Module[{d = Divisors[n], p}, p = Plus @@ Select[d, OddQ] - Plus @@ Select[d, EvenQ]; PrimeQ[p]]; Select[Range[2, 1000000, 2], f] (* T. D. Noe, Sep 19 2011 *)
PROG
(PARI) list(lim)=my(v=List(), t); forstep(n=3, sqrt(lim\2), 2, if(isprime(s=sigma(n^2)), listput(v, 2*n^2))); t=2; while((t*=2)<=lim, if(isprime(2*sigma(t/2)-1), listput(v, t))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 18 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 17 2011
STATUS
approved