%I #28 Sep 08 2022 08:45:19
%S 9,25,49,121,169,289,625,841,961,1225,1681,1849,2401,3025,4489,5929,
%T 6889,10201,11881,13225,14161,15625,17689,19321,20449,22801,24025,
%U 24649,25921,32041,32761,39601,41209,44521,48841,49729,55225,57121,69169
%N Squares of the form 4p - 3, where p is a prime.
%C Also: squares of the form 2*s-3, where s is a semiprime, A107317. - _Franklin T. Adams-Watters_, Jun 28 2010
%C Squares are less dense then primes and easy to generate so it's faster to check squares if they are of the required form than to check if primes are of the required form. - _David A. Corneth_, Oct 15 2018
%H David A. Corneth, <a href="/A110284/b110284.txt">Table of n, a(n) for n = 1..16289</a> (First 1316 terms by Marius A. Burtea, terms < 10^11)
%F a(n) = 4*A002383(n) - 3 = A088503(n-1)^2.
%t Select[ 4Prime[ Range[2000]] - 3, IntegerQ[ Sqrt[ # ]] &] (* _Robert G. Wilson v_, Sep 20 2005 *)
%o (PARI) isok(n) = issquare(n) && (p=(n+3)/4) && (frac(p)==0) && isprime(p); \\ _Michel Marcus_, Oct 15 2018
%o (PARI) upto(n) = my(res = List()); forstep(i = 3, sqrtint(n), 2, if(isprime((i^2+3)/4), listput(res, i^2))); res \\ _David A. Corneth_, Oct 15 2018
%o (Magma) [4*p - 3: p in PrimesUpTo(10^5)|IsSquare (4*p - 3)]; // _Vincenzo Librandi_, Oct 17 2018
%Y Cf. A002383, A002384, A088503, A001358.
%K nonn
%O 1,1
%A _Giovanni Teofilatto_, Sep 07 2005
%E Extended by _Ray Chandler_, Sep 07 2005