login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A252231 Primes of the form (p+q)^2 + pq, where p and q are consecutive primes. 1

%I #13 Sep 06 2020 12:49:44

%S 31,79,179,401,719,1619,3371,8819,12491,15671,23801,25919,28871,32801,

%T 95219,118571,154871,161999,190121,266801,322571,364499,375371,449951,

%U 524831,725801,772229,796001,820109,994571,1026029,1053401,1081121,1225109,1326089,1415039

%N Primes of the form (p+q)^2 + pq, where p and q are consecutive primes.

%H K. D. Bajpai, <a href="/A252231/b252231.txt">Table of n, a(n) for n = 1..12799</a>

%e 79 is in the sequence because (3+5)^2 + 3*5 = 79, which is prime.

%e 401 is in the sequence because (7+11)^2 + 7*11 = 401, which is prime.

%p count:= 0:

%p p:= 2:

%p while count < 100 do

%p q:= nextprime(p);

%p x:= (p+q)^2+p*q;

%p if isprime(x) then

%p count:= count+1;

%p a[count]:= x;

%p fi;

%p p:= q;

%p od:

%p seq(a[i],i=1..count); # _Robert Israel_, Dec 16 2014

%t Select[Table[(Prime[n] + Prime[n+1])^2 + Prime[n]Prime[n+1], {n,100}], PrimeQ[#] &]

%t Select[Total[#]^2+Times@@#&/@Partition[Prime[Range[100]],2,1],PrimeQ] (* _Harvey P. Dale_, Sep 06 2020 *)

%o (PARI) s=[]; for(k=1, 100, p=prime(k); q=prime(k+1); t=(p+q)^2 + p*q; if(isprime(t), s=concat(s, t))); s

%Y Cf. A000040, A007645, A003136, A243761, A252017.

%K nonn

%O 1,1

%A _K. D. Bajpai_, Dec 15 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 09:04 EDT 2024. Contains 371240 sequences. (Running on oeis4.)