OFFSET
1,1
COMMENTS
Also primes in A155173 = Short leg A of primitive Pythagorean triangles such that perimeters are Averages of twin prime pairs... - Vladimir Joseph Stephan Orlovsky, Jan 21 2009
All terms >3 are congruent to 5 modulo 6. - Zak Seidov, Mar 21 2014
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7) = 101: 101*101 + 101 - 1 = 10301, 10301 and 10303 twin primes.
MATHEMATICA
lst={}; Do[p=Prime[n]; If[PrimeQ[p1=p*p+p-1]&&PrimeQ[p1+2], AppendTo[lst, p]], {n, 2*7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jan 21 2009 *)
Select[Prime[Range[2000]], AllTrue[#^2+#+{1, -1}, PrimeQ]&] (* Harvey P. Dale, Feb 22 2023 *)
PROG
(PARI) forprime(p=2, 1e5, if(isprime(p^2+p-1)&&isprime(p^2+p+1), print1(p", "))) \\ Charles R Greathouse IV, Dec 27 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Nov 09 2003
STATUS
approved