23. A total of 2021 balls are arranged in a row and are numbered from 1 to 2021. Each ball is coloured in one of four colours: green, red, yellow or blue. Among any five consecutive balls there is exactly one red, one yellow and one blue ball. After any red ball the next ball is yellow. The balls numbered 2 and 20 are both green. What colour is the ball numbered 2021?
A Green
B Red
C Yellow
D Blue
E It is impossible to determine
Solution
D

Each set of 5 consecutive balls must contain exactly one red, one yellow and one blue, and hence must also contain exactly two green balls. The set of 5 consecutive balls that starts with the ball numbered $N$ has the same colours as the set starting with $N+1$ (and both sets contain the four balls $N+1, N+2, N+3, N+4$ ), so the colour of ball $N+5$ must be the same as ball $N$. The 20th ball is green, so the 15 th, 10 th and 5th balls are also green. Hence the first five balls are coloured ?G??G. But each red is immediately followed by a yellow, so the pair in between the two greens are red, yellow. Therefore the first 5 balls are BGRYG. The 2021st ball is the same colour as the 1st ball since $2021-1$ is a multiple of 5 and so it is blue.