[Math] Show that any set of 7 distinct integers includes two integers $x$ and $y$, such that either $x-y$ or $x+y$ is divisible by 10

elementary-number-theorypigeonhole-principle

Show that any set of 7 distinct integers includes two integers $x$ and $y$, such that either $x-y$ or $x+y$ is divisible by 10. I'm trying to apply the pigeonhole principle, but haven't been able to come up with a convincing argument.

Though similar to this question, I think the difference between the two is enough to warrant a second post.

Best Answer

$$a\equiv0,\pm1,\pm2,\pm3,\pm4,5\pmod{10}\implies a^2\equiv0,1,4,9,6,5$$ So, there are $6$ in-congruent squares $\pmod{10}$

So, if we choose more than $6$ distinct integers, at least two squares will be congruent $\pmod{10}$