That is, in each case we have a positive integer y (in this example y takes values 5, 4, 3 and 2 respectively) which divides x and leaves remainder 'r' (in our case r is 0, 3, 2 and 1 respectively), that is smaller than y. In the process of writing above equations, unknowingly, we have used Division Algorithm.
Getting back to our puzzle. To solve it we must look for the multiples of 5, which satisfy all the conditions, because x = 5a + 0If a number leaves remainder 1 when it is divided by 2 we must consider odd multiples only. In this case we have 5, 15, 25, 35 and 45. Similarly if we check for the remaining two conditions you will get 35.
Therefore, the swarm of bees contains 35 bees.Let us generalise this. For each pair of positive integers a and b (dividend and divisor respectively), we can find the whole numbers q and r (quotient and remainder respectively) satifying the relation
a = bq + r, 0 < r < b