OFFSET
1,1
COMMENTS
52 is the first term that is not a member of A046711.
EXAMPLE
13 is a term because 13 = 2^2 + 3^2 and 13^2 = 3^2 + 4^2 + 12^2.
PROG
(PARI) isA000404(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))}
isA000408(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); }
lista(nn) = for(n=1, nn, if(isA000404(n) && isA000408(n^2), print1(n, ", ")));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Apr 21 2016
STATUS
approved