18. Find the least $n$ such that whenever the elements of the set $\{1,2, \ldots, n\}$ are coloured red or blue, there always exist $x, y, z, w$ (not necessarily distinct) of the same colour such that $x+y+z=w$.
18. Ans: 11
It can easily be checked that if $1,2,9,10$ are red and $3,4,5,6,7,8$ are blue, then there do not exist $x, y, z, w$ of the same colour such that $x+y+z=w$. So $n \geq 11$.
Suppose there exists a colouring (for $n=11$ ) such that there do not exist $x, y, z, w$ of the same colour such that $x+y+z=w$. Then 1,9 must be of a different colour from 3. Thus say 1 and 9 are red, and 3 is blue. Since $7+1+1=9,7$ must then be blue. Now, $2+3+3=7$, so that 2 is red, and hence $4(=1+1+2)$ is blue. But $11=3+4+4=9+1+1$, a contradiction.