Skip to main content
2 of 4
added 10 characters in body
cleblanc
  • 3.5k
  • 10
  • 16

C (gcc), 67 63 60 bytes

i,s;f(n){for(s=i=0;++i<=n;)s+=n%i?0:i*i;n=sqrt(s);n=n*n==s;}

Try it online!

cleblanc
  • 3.5k
  • 10
  • 16