Legendre's three-square theorem
In mathematics, Legendre's three-square theorem states that a natural number can be represented as the sum of three squares of integers n = x 2 + y 2 + z 2 {\displaystyle n=x^{2}+y^{2}+z^{2}} if and only if n is not of the form n = 4 a ( 8 b + 7 ) {\displaystyle n=4^{a}(8b+7)} for nonnegative integers a and b. The first numbers that cannot be expressed as the sum of three squares (i.e.
Source: Wikipedia — Legendre's three-square theorem (CC BY-SA 4.0)