%I #50 Sep 08 2022 08:46:05
%S 3,11,59,139,179,419,919,1399,3119,5099,6379,8059,9377,16007,31489,
%T 39461,60899,83639,87767,92867,100799,135719,161879,163019,166457,
%U 179393,206699,218459,229157,273059,317599,338659,363799,367219,389839,411311,442733,491039
%N Primes p such that p+q+1 is the square of a prime, where q is the next prime after p.
%C Terms from _Charles R Greathouse IV_.
%H Charles R Greathouse IV, <a href="/A225809/b225809.txt">Table of n, a(n) for n = 1..1000</a>
%e 11+13+1=25=5^2 with 5 a prime.
%t Select[Partition[Prime[Range[41000]],2,1],PrimeQ[Sqrt[Total[#]+1]]&][[All,1]] (* _Harvey P. Dale_, Apr 17 2022 *)
%o (PARI) p=2;forprime(q=3,1e9,if(issquare(p+q+1,&t)&&isprime(t),print1(p", "));p=q) \\ _Charles R Greathouse IV_, Aug 27 2013
%o (Magma) [p: p in PrimesUpTo(5*10^5) | IsSquare(t) and IsPrime(Isqrt(t)) where t is p+NextPrime(p)+1]; // _Bruno Berselli_, Aug 28 2013
%K nonn
%O 1,1
%A _J. M. Bergot_, Aug 27 2013
|