prob211(N)= { tot = 0; for (i=1,N-1, x = divisors(i); subtot = 0; for (j=1,length(x), subtot += (x[j]^2); ); if (issquare(subtot), tot += i); ); print(tot); }