Copyright © University of Cambridge. All rights reserved.
'Indivisible' printed from http://nrich.maths.org/
Suppose there was one extra imaginary student in the production. Then, when they lined up in threes, the extra student could go with the left-over students to make another line. The same would happen with fours, fives and sixes.
Therefore, when there is one extra student, the number is divisible by $3$, $4$, $5$ and $6$. This means it is a common multiple of these numbers. The lowest common multiple of $3$, $4$, $5$ and $6$ is $60$, so there must be $60$ students with the extra.
Therefore the number of students (without the imaginary student) is $59$.
This problem is taken from the UKMT Mathematical Challenges.