Comment by nk_kolja

16 days ago

Reducing the problem to a quadratic form is pretty natural, and the paper from 2009 (though i see 2015) is quite an overkill. The result is a fairly standard consequence of the theory of representation by quadratic forms, and follows from Legendre's three square's theorem after some massaging. There's a good couple of centuries of foundations behind it.