Your solution seems correct. However, contains 125,000 elements, not 124,999 (you have to add 1 b/c you have an inclusive set). So the answer should be 93,750.
Let be the set of all positive integers not exceeding such that , that is, .
How many of the elements of can be written as the sum of the three integer squares?
A theorem says that can be written as sum of three integer squares iff for non-negative integers .
So can be written as sum of three integer squares iff , or in another word when with variable has no integer solution.
is not an integer when , and is an integer when .
Work out how many CANNOT be written as sum of three integer squares.
When , are not in .
When , are in .
We require or , hence there are elements in that cannot be written as sum of three integer squares.
There are elements in , hence elements can be written as sum of three integer squares.
it appears that i agree with your answer, although i do not know how you can conclude that x is an integer when k = 0. for then:
x = m + 7/8 - 1/2 = m + 3/8, which is *not* an integer.