From the statement below, how can the author say that "every natural number can be written in the form $50000k\pm r$ with $0\le r\le 25000$" .Is there a rule or theory about that, or It is just a counterexample?From all the numbers,why 50 000 and 25000?Can someone enlighten me? It's from the journal Oblath's Problem
Since every natural number can be written in the form $50000k\pm r$ with $0\le r\le 25000$, and $(50000k\pm r)^2\equiv r^2\pmod {100000}$, we compute $r^2$ for $r\le 25000$ and find that the last 4 digits of any square can be equal only when all of them equal 0,
It is a general fact, known as "Euclidean division" (Wikipedia), that for any integers $a$ and $b$ (with $b\neq 0$), there are unique integers $k$ and $r$ such that $$a=bk+r\qquad\text{ and }\qquad 0\leq r<|b|$$ Usually, the number $r$ is referred to as the "remainder" of dividing $a$ by $b$. However, this theorem can be slightly modified (see here in the Wikipedia article) to say that there are unique integers $k$ and $r$ such that $$a=bk+r\qquad\text{ and }\qquad -\left\lfloor {\frac {b}{2}}\right\rfloor \leq r<b-\left\lfloor {\frac {b}{2}}\right\rfloor$$ which, for the choice of $b=50000$, says that any integer $a$ can be written uniquely as $a=50000k+r$ with $$-25000\leq r<25000$$ Now, in the statement you cited, the author has just slightly removed the uniqueness, and instead made the weaker (but no less valid) statement that any $a$ can be written as $a=50000k+r$ with $$-25000\leq r\leq 250000$$