# Lagrange and 2017

Lagrange's four square theorem says that every non-negative integer $$n$$ can be expressed as a sum of 4 perfect squares.

For example: $$2017= 18^2+ 21^2+ 24^2 +26^2$$.

How many quadruples of positive integers $$(a,b,c,d)$$ such that $$a\le b\le c\le d$$ and $$a^2+b^2+c^2+d^2=2017$$?

×