Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #35 Feb 22 2023 09:35:34
%S 2,3,5,41,59,89,101,131,743,761,1193,2411,2663,2729,3011,3221,3251,
%T 3449,4751,6173,6599,6833,7229,8669,9059,9323,9521,9719,9743,10151,
%U 10781,11549,11933,12143,12251,12473,12641,13553,13613,14939,15569,16301
%N Primes p such that p^2+p-1 and p^2+p+1 are twin primes.
%C 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
%C All terms >3 are congruent to 5 modulo 6. - _Zak Seidov_, Mar 21 2014
%C Intersection of A000040 and A088485. - _Danny Rorabaugh_, May 15 2017
%H Pierre CAMI, <a href="/A088483/b088483.txt">Table of n, a(n) for n = 1..10000</a>
%e a(7) = 101: 101*101 + 101 - 1 = 10301, 10301 and 10303 twin primes.
%t 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 *)
%t Select[Prime[Range[2000]],AllTrue[#^2+#+{1,-1},PrimeQ]&] (* _Harvey P. Dale_, Feb 22 2023 *)
%o (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
%Y Cf. A001097, A088484, A088485.
%K nonn
%O 1,1
%A _Pierre CAMI_, Nov 09 2003