Decomposition as sum of 4 squares
This scripts writes N as a sum of 2, 3 or 4 non null squares by brute force.
Number :
min :
Arithmetic expression with ( ) * + - / allowed
sum of two squares
sum of three squares
sum of four squares
JavaScript mandatory ! na !