Show that for any natural number $n$, between $n^2$ and $(n+1)^2$ one can find three distinct natural numbers $a,b,c$ such that $a^2+b^2$ is divisible by $c$.
A friend and I found a general case that always work with a computer problem, I would like to see a different solution, or a solution that tells the motivation of how to find that general case without a computer.
It looks like it is easier to be divisible by a smaller number, so let $c$ be the least one. The only thing that matters for divisibility of the sum of squares by $c$ is what remainders $a,b$ have modulo $c$, so let $x,y$ be those remainders. Then, since we are squeezed in a narrow window, we have $a=c+x$, $b=c+y$, $c|x^2+y^2$. Now, $c>n^2$ and, certainly, $x,y<2n$, so if $x^2+y^2=kc$, we have $1\le k\le 7$ and it looks like the less $k$ is, the more room we have. Thus, we want $0<x<y$ so that $x^2+y^2>n^2$ and $x^2+y^2+y<(n+1)^2$. Now it is pretty clear where the formulae you mentioned came from: to have more room, we want to have $c$ as much to the left as possible, so let us try $c=n^2+1$. Then the trivial representation $c=x^2+y^2$ with $x=1,y=n$ jumps at you and this choice works. The other extreme would be trying to make the step $y$ as small as possible, i.e., to choose the least $x>\frac n{\sqrt 2}$ and put $y=x+1$. However, the trivial estimate for the "offset" $c-n^2$ will then be of order $3\sqrt 2n$, which is greater than $2n$, so, to make this plan work, we'll need to exercise more care. It is still possible and even gives smaller "range" for really large $n$: you can squeeze $a,b,c$ between $n^2$ and $n^2+qn$ for any $q>\frac 1{\sqrt 2}$ and $n>n_0(q)$, which is pretty much the best one can hope for. Still, this small improvement is hardly worth the cost as far as the original problem is concerned.