OFFSET
1,2
COMMENTS
If p is prime, then (sigma(p) + product of divisors of p) = 2*p+1. So the subsequence of primes gives the Sophie Germain primes: A005384. - Michel Marcus, Jul 16 2015
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 8; divisors(8) = {1,2,4,8}; sum = 1+2+4+8 = 15; product = 1*2*4*8 = 64; 15 + 64 = 79, which is prime.
a(8) = 27; divisors(27) = {1,3,9,27}; sum = 1+3+9+27 = 40; product = 1*3*9*27 = 729; 40+729 = 769, which is prime.
MATHEMATICA
Select[Range[2000], PrimeQ[DivisorSigma[1, #] + Times@@Divisors[#]] &]
PROG
(Magma) [n: n in[1..1000] | IsPrime(&*Divisors(n) + SumOfDivisors(n))];
(PARI) for(n=1, 1000, d=divisors(n); k=sigma(n) + prod(i=1, #d, d[i]); if(isprime(k), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Jul 15 2015
STATUS
approved