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
31, 79, 179, 401, 719, 1619, 3371, 8819, 12491, 15671, 23801, 25919, 28871, 32801, 95219, 118571, 154871, 161999, 190121, 266801, 322571, 364499, 375371, 449951, 524831, 725801, 772229, 796001, 820109, 994571, 1026029, 1053401, 1081121, 1225109, 1326089, 1415039 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
79 is in the sequence because (3+5)^2 + 3*5 = 79, which is prime.
401 is in the sequence because (7+11)^2 + 7*11 = 401, which is prime.
MAPLE
count:= 0:
p:= 2:
while count < 100 do
q:= nextprime(p);
x:= (p+q)^2+p*q;
if isprime(x) then
count:= count+1;
a[count]:= x;
fi;
p:= q;
od:
seq(a[i], i=1..count); # Robert Israel, Dec 16 2014
MATHEMATICA
Select[Table[(Prime[n] + Prime[n+1])^2 + Prime[n]Prime[n+1], {n, 100}], PrimeQ[#] &]
Select[Total[#]^2+Times@@#&/@Partition[Prime[Range[100]], 2, 1], PrimeQ] (* Harvey P. Dale, Sep 06 2020 *)
PROG
(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
CROSSREFS
Sequence in context: A139855 A139901 A242777 * A044169 A044550 A055810
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Dec 15 2014
STATUS
approved

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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)