OFFSET
1,1
COMMENTS
If a(n) = x^2 + y^2 then y = floor(sqrt(a(n))) and by a well known Euler theorem, the representation is unique.
Odd primes p = x^2 + y^2 such that y > x^2/2. - Thomas Ordowski, Aug 16 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
MAPLE
filter:= p -> isprime(p) and issqr(p - floor(sqrt(p))^2):
select(filter, [seq(p, p=1..10000, 4)]); # Robert Israel, Dec 04 2018
MATHEMATICA
okQ[n_]:=PrimeQ[n]&&IntegerQ[Sqrt[n-Floor[Sqrt[n]]^2]]; Select[4Range[500]+1, okQ] (* Harvey P. Dale, Mar 23 2011 *)
PROG
(PARI) isok(p) = isprime(p) && ((p%4) == 1) && issquare(p - sqrtint(p)^2); \\ Michel Marcus, Dec 04 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Shevelev, Sep 29 2008
STATUS
approved