$n$ is an integer such that $1 \le n \le 2018$ . If $n$ can be expressed in the form of $a^2+b^2+c^2+d^2$ ,where $a,b,c,d$ are integers. Find the sum of all possible values of $n$ .

Try my set here

The answer is 2037171.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Lagrange's Four Squares Theorem