OFFSET
1,1
COMMENTS
Composite numbers in A008784. - R. J. Mathar, Jul 08 2012
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
10 is in the sequence because 10 = 1^2 + 3^2 = 2*5;
25 is in the sequence because 25 = 3^2 + 4^2 = 5*5;
65 is in the sequence because 65 = 1 + 8^2 = 4^2 + 7^2 = 5*13.
MAPLE
with(numtheory):T:=array(0..50000000):U=array(0..50000000 ):k:=1:for x from 1 to 1000 do:for y from x to 1000 do:if type(x^2+y^2, prime)=false and gcd(x, y)=1 then T[k]:=x^2+y^2:k:=k+1:else fi: od :od:mini:=T[1]:ii:=1:for p from 1 to k-1 do:or n from 1 to k-1 do:if T[n] < mini then mini:= T[n]:ii:=n: indice:=U[n]: else fi:od:print(mini):T[ii]:= 99999999: ii:=1:mini:=T[1] :od:
PROG
(PARI) list(lim)=my(v=List(), x2, t); lim\=1; for(x=3, sqrtint(lim-1), x2=x^2; for(y=1, min(x-1, sqrtint(lim-x2)), if(gcd(x, y)==1 && !isprime(t=x2+y^2), listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Jan 27 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 06 2010
STATUS
approved