A195382 Numbers such that the difference between the sum of the even divisors and the sum of the odd divisors is prime.
4, 8, 16, 18, 32, 50, 256, 512, 578, 1458, 2048, 3362, 4802, 6962, 8192, 10082, 15842, 20402, 31250, 34322, 55778, 57122, 59858, 167042, 171698, 293378, 524288, 559682, 916658, 982802, 1062882, 1104098, 1158242, 1195058, 1367858, 1407842, 1414562
Offset: 1
Keywords
Examples
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.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
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
Comments