login
A214329
Complement of A214328.
2
2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 109
OFFSET
1,1
COMMENTS
Numbers that are the sum of 2 or 3 nonzero squares. - Altug Alkan, Jan 13 2016
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