OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
10 is a term because 10 = 1^2 + 3^2 and 10 is divisible by 1, 2, 5, 10 and 1 + 2 + 5 + 10 = 3^2 + 3^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))
lista(nn) = for(n=1, nn, if(isA000404(n) && isA000404(sigma(n)), print1(n, ", ")));
(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))
list(lim)=my(v=List(), x2, t); lim\=1; for(x=1, sqrtint(lim-1), x2=x^2; for(y=1, sqrtint(lim-x2), if(isA000404(sigma(t=x2+y^2)), listput(v, t)))); Set(v) \\ Charles R Greathouse IV, Apr 30 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Altug Alkan, Apr 30 2016
STATUS
approved