OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
N:= 10000:
A:= NULL:
for x from 1 by 4 while x^2 < N do
for y from 2 by 4 while x^2 + y^2 < N do
v:= x^2 + y^2;
if isprime(v) then A:= A, v fi
od od:
sort(convert({A}, list)); # Robert Israel, Aug 26 2018
PROG
Contribution from Michael B. Porter, Dec 10 2009: (Start)
(PARI) /* numbers of the form (4x+1)^2 + (4y+2)^2 for x, y >= 0 */
/* largest possible x */
xm(n)=floor((sqrt(n-4)-1)/4)
/* determine if n - (4x+1)^2 is a square, and put the square root into a */
isform(n)={local(r, a); r=0; for(x=0, xm(n), if(issquare(n-(4*x+1)^2, a), if(Mod(a, 4)==Mod(2, 4), r=1))); r}
/* skip isform() calculation if possible */
isA087879(n) = if(n>4 && Mod(n, 2)==Mod(1, 2) && isprime(n), isform(n), 0) (End)
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Oct 11 2003
STATUS
approved