login
Primes of the form p*q + p - q, where p and q are distinct primes.
3

%I #11 Jul 19 2016 10:55:09

%S 5,7,13,17,19,29,31,37,41,43,61,67,73,89,97,103,109,113,127,137,139,

%T 149,151,157,181,193,197,199,211,229,233,241,257,271,277,281,283,307,

%U 313,317,337,349,353,373,379,389,397,401,409,421,433,449,457,461,463,487

%N Primes of the form p*q + p - q, where p and q are distinct primes.

%H Charles R Greathouse IV, <a href="/A091301/b091301.txt">Table of n, a(n) for n = 1..10000</a>

%t nn=100;Take[Select[Union[Flatten[{First[#]*Last[#]+First[#]-Last[#], First[#]*Last[#]- First[#]+Last[#]}&/@Subsets[Prime[Range[nn]],{2}]]], PrimeQ],nn] (* _Harvey P. Dale_, Jul 12 2014 *)

%o (PARI) list(lim)=my(v=List(),t);forprime(q=2,lim,forprime(p=2,(lim+q)\(q+1),if(ispseudoprime(t=p*q+p-q),listput(v,t))));vecsort(Vec(v),,8) \\ _Charles R Greathouse IV_, Feb 15 2011

%Y Primes of the form p*q+p+q, where p and q are primes, are in A066938.

%Y Cf. A091310.

%K easy,nonn

%O 1,1

%A _Zak Seidov_, Feb 21 2004

%E Definition clarified by _Harvey P. Dale_, Jul 12 2014