OFFSET
1,1
COMMENTS
Numbers that are the sum of 2 or 3 nonzero squares. - Altug Alkan, Jan 13 2016
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
PROG
(PARI) is2(n) = {for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))}
is3(n) = {my(a, b) ; a=1; while(a^2+1<n, b=1 ; while(b<=a && a^2+b^2<n, if(issquare(n-a^2-b^2), return(1) ) ; b++ ; ) ; a++ ; ) ; return(0) ; }
for(n=2, 1e3, if(is2(n) || is3(n), print1(n, ", "))); \\ Altug Alkan, Jan 13 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 26 2012, following a suggestion from Hans Isdahl, Apr 19 2012
STATUS
approved