TITLE: Prove that given any ﬁve integers, there will be three for which the sum of the squares of those integers is divisible by 3.
QUESTION [7 upvotes]: Basically the question is asking us to prove that given any integers $$x_1,x_2,x_3,x_4,x_5$$ Prove that 3 of the integers from the set above, suppose $$x_a,x_b,x_c$$ satisfy this equation: $$x_a^2 + x_b^2 + x_c^2 = 3k$$ So I know I am suppose to use the pigeon hole principle to prove this. I know that if I have 5 pigeons and 2 holes then 1 hole will have 3 pigeons. But what I am confused about is how do you define the hole? Do I just say that the container has a property such that if 3 integers are in it then those 3 integers squared sum up to a multiple of 3?

REPLY [5 votes]: Any integer is of one of the following forms:

$3k + 0$ (these are the multiples of 3)
$3k + 1$
$3k + 2$

where $k$ is an integer.

If we square these, we get 

$9k^2$
$9k^2 + 6k + 1$
$9k^2 + 12k + 4$

If we then look at the remainders of these when divided by $3$, because $9$, $6$, and $12$ are all divisible by $3$, we see that

$9k^2 \equiv 0 \pmod 3$
$9k^2 + 6k + 1 \equiv 1 \pmod 3$
$9k^2 + 12k + 4 \equiv 1 \pmod 3$

So any squared integer is equivalent to $0$ or $1$, modulo $3$.
These will be our two pigeon holes.

Applying the pigeonhole principle to the squares of our 5 integers, we see that either at least 3 have remainder $0$, or at least 3 have remainder $1$. Let's call these 3 integers $x_1$, $x_2$, and $x_3$.
In the former case, $x_i^2 \equiv 0 \pmod 3$ and so the sum of these $x_1^2 + x_2^2 + x_3^2 \equiv 0 + 0 + 0 \pmod 3 \equiv 0 \pmod 3$
In the latter case, $x_i^2 \equiv 1 \pmod 3$ and so the sum of these $x_1^2 + x_2^2 + x_3^2 \equiv 1 + 1 + 1 \pmod 3 \equiv 0 \pmod 3$
QED