2. Hudson labels each of the four vertices of a triangular pyramid with a different integer chosen from 1 to 15 . For each of the four triangular faces, he then calculates the mean of the three numbers at the vertices of the face.
Given that the means calculated by Hudson are all integers, how many different sets of four numbers could he have chosen to label the vertices of the triangular pyramid?
Say the numbers on the four vertices are $a, b, c$ and $d$.
Hudson has chosen numbers such that $a+b+c, a+b+d, a+c+d$ and $b+c+d$ are all multiples of 3 .
Say we have three numbers, $x, y$ and $z$, whose sum is a multiple of 3 , and let the remainders when $x, y$ and $z$ are divided by 3 be $p, q$ and $r$ [note that $p, q$ and $r$ can only be 0,1 or 2].
Then $p+q+r$ must also be a multiple of 3 (otherwise there would be a remainder when $x+y+z$ was divided by 3 ).
So either:
- $p+q+r=0$, in which case $p=q=r=0$; or
- $p+q+r=3$, in which case $p=q=r=1$ or $p, q$ and $r$ take the values 0,1 and 2 in some order; or
- $p+q+r=6$, in which case $p=q=r=2$.

Hence either all three of $x, y$ and $z$ have the same remainder when divided by 3 , or they all have a different remainder when divided by 3 .
Going back to $a, b, c$ and $d$ :
if $a, b$ and $c$ all have a different remainder when divided by 3 , we can say without loss of generality that $a$ is divisible by $3, b$ has a remainder of 1 when divided by 3 , and $c$ has a remainder of 2 .
Then, since $b+c+d$ is divisible by $3, d$ must be divisible by 3 (since $b+c$ is divisible by 3 ).
However, then $a+b+d$ would have a remainder of 1 when divided by 3 , which isn't allowed, so $a, b$ and $c$ cannot all have a different remainder when divided by 3 .
Hence $a, b$ and $c$ must have the same remainder when divided by 3 . Once this is established, it quickly becomes clear that $d$ must also have the same remainder when divided by 3 .
If that remainder is 1 , then $a, b, c$ and $d$ are four of the five numbers $1,4,7,10$ and 13. There are 5 ways to choose four numbers from this set (since there are five ways to choose which number to leave out).
If that remainder is 2 , then again there Hudson chose four of the five numbers $2,5,8,11$ and 14 , which gives another five ways to choose the numbers.
And finally, if that remainder is 0 , then Hudson chose four of the five numbers 3, 6, 9, 12 and 15 , which gives another five ways.
Hence the total number of different sets of numbers could have chosen is $5+5+5=15$.
REMARK
If you have seen modular arithmetic before, you will find it a very helpful way to notate an answer which uses this argument.