OFFSET
1,1
COMMENTS
Also: squares of the form 2*s-3, where s is a semiprime, A107317. - Franklin T. Adams-Watters, Jun 28 2010
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
LINKS
David A. Corneth, Table of n, a(n) for n = 1..16289 (First 1316 terms by Marius A. Burtea, terms < 10^11)
MATHEMATICA
Select[ 4Prime[ Range[2000]] - 3, IntegerQ[ Sqrt[ # ]] &] (* Robert G. Wilson v, Sep 20 2005 *)
PROG
(PARI) isok(n) = issquare(n) && (p=(n+3)/4) && (frac(p)==0) && isprime(p); \\ Michel Marcus, Oct 15 2018
(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
(Magma) [4*p - 3: p in PrimesUpTo(10^5)|IsSquare (4*p - 3)]; // Vincenzo Librandi, Oct 17 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Giovanni Teofilatto, Sep 07 2005
EXTENSIONS
Extended by Ray Chandler, Sep 07 2005
STATUS
approved