login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A154942
Primes p such that (p-1)*p*(p+1)-p-2 and (p-1)*p*(p+1)+p+2 are primes.
1
3, 5, 29, 71, 113, 263, 1103, 2339, 3203, 3413, 3593, 3659, 3719, 4421, 5939, 6269, 7841, 9011, 9029, 13121, 13841, 14423, 15671, 17033, 19073, 22079, 22811, 26783, 27851, 28949, 29303, 30839, 31973, 32063, 32141, 34301, 38543, 38873, 39119
OFFSET
1,1
COMMENTS
2*3*4=24-3-2=19, 2*3*4=24+3+2=29, ...
MATHEMATICA
lst={}; Do[p=Prime[n]; If[PrimeQ[(p-1)*p*(p+1)-p-2]&&PrimeQ[(p-1)*p*(p+1)+p+2], AppendTo[lst, p]], {n, 8!}]; lst
prQ[n_]:=Module[{x=n^3-n, y=n+2}, And@@PrimeQ[{x+y, x-y}]]; Select[Prime[ Range[4200]], prQ] (* Harvey P. Dale, Jun 21 2012 *)
KEYWORD
nonn
AUTHOR
STATUS
approved