A number when divided by 2 leaves a remainder of 1. When it is divided by 3 leaves a remainder 2. When it is divided by 4 it leaves a remainder of 3. And when it is divided by 5 it leaves remainder of 4. What should be the number ?
Note : I already formulated some formula but I think it might not work:
x = 2a + 1
x = 3b + 2
x = 4c + 3
x = 5d + 4
This is a classic problem in number theory solved by the Chinese remainder theorem. You can look up this algorithm many places, but indeed the (smallest) solution (as posted by @metamorphy) is $59$.