login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Primes of the form p*q+4 where p and q are consecutive primes.
2

%I #17 Sep 21 2020 14:54:08

%S 19,1151,4091,30971,47057,55691,141371,148991,223697,256031,265193,

%T 329471,355211,948671,1223231,1545017,1607747,1653791,2062091,2238011,

%U 2390111,2572811,3041531,3625211,4305593,4553951,5541311,5635871

%N Primes of the form p*q+4 where p and q are consecutive primes.

%H Harry J. Smith, <a href="/A063442/b063442.txt">Table of n, a(n) for n = 1..1000</a>

%e prime(449) * prime(450) + 4 = 3169 * 3181 + 4 = 10080593, a prime.

%t f[n_]:=Prime[n]*Prime[n+1]+4; lst={}; Do[If[PrimeQ[f[n]],AppendTo[lst,f[n]]],{n,6!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Feb 10 2010 *)

%t Select[Times@@#+4&/@Partition[Prime[Range[500]],2,1],PrimeQ] (* _Harvey P. Dale_, Sep 21 2020 *)

%o (PARI) j=[]; for(n=1,500,x=(prime(n)*prime(n+1))+4; if(isprime(x),j=concat(j,x))); j

%o (PARI) { n=0; for (m=1, 10^9, if (isprime(a=prime(m)*prime(m + 1) + 4), write("b063442.txt", n++, " ", a); if (n==1000, break)) ) } \\ _Harry J. Smith_, Aug 21 2009

%K easy,nonn

%O 1,1

%A _Jason Earls_, Jul 23 2001