Skip to main content
added 103 characters in body
Source Link
DimChtz
  • 967
  • 5
  • 13

Matlab, 3939 37 bytes

@(v)mod~mod(sqrt(sum(divisors(v).^2)),1)==0

Unfortunately, it doesn't work on Octave (on tio) so no tio link.

Note As @LuisMendo stated, divisors() belongs to Symbolic Toolbox.

Matlab, 39 bytes

@(v)mod(sqrt(sum(divisors(v).^2)),1)==0

Unfortunately, it doesn't work on Octave so no tio link.

Matlab, 39 37 bytes

@(v)~mod(sqrt(sum(divisors(v).^2)),1)

Unfortunately, it doesn't work on Octave (on tio) so no tio link.

Note As @LuisMendo stated, divisors() belongs to Symbolic Toolbox.

Source Link
DimChtz
  • 967
  • 5
  • 13

Matlab, 39 bytes

@(v)mod(sqrt(sum(divisors(v).^2)),1)==0

Unfortunately, it doesn't work on Octave so no tio link.