OFFSET
1,1
COMMENTS
Primes of the form k^3 + k^2 - 2k + 1 where 2k-1 is prime.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
((5+1)/2)^3 + ((5-1)/2)^2 = 27 + 4 = 31, ((7+1)/2)^3 + ((7-1)/2)^2 = 64 + 9 = 73
MAPLE
res:= NULL:
count:= 0:
p:= 2
while count < 100 do
p:= nextprime(p);
r:= ((p+1)/2)^3 + ((p-1)/2)^2;
if isprime(r) then
res:= res, r;
count:= count+1;
fi
od:
res; # Robert Israel, Oct 10 2016
MATHEMATICA
f[n_]:=((p+1)/2)^3+((p-1)/2)^2; lst={}; Do[p=Prime[n]; If[PrimeQ[f[p]], AppendTo[lst, f[p]]], {n, 6!}]; lst
PROG
(PARI) lista(nn) = forprime(p=3, nn, if (isprime(q=((p+1)/2)^3 + ((p-1)/2)^2), print1(q, ", "))); \\ Michel Marcus, Oct 11 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jul 27 2009
EXTENSIONS
Description and edits by Charles R Greathouse IV, Oct 05 2009
STATUS
approved