# Solution Process

When a number is divided by 5,remainder is 4.When the same number is divided by 4,remainder is 3 & so on that when divided by 2,remainder is 1.What's the number ?

I know the answer is 59.
But I want to know the process of solving this problem.

### Re: Solution Process

I don't know about Chinese remainder theorem,if you'd explain here then I'll be happy.

And regarding the 2nd process,it's confusing one.And if we start from divided by 100 to give remainder 99 & so on,then think how long it'll take & how much complex it'd be to solve.

### Re: Solution Process

Perucho, I liked it!
There are of course different general ways to solve this problem and I guess that the purpose of the author was indeed to use one of these mathematical tools. Your method is specially tailored to this particular problem, but its elegance transforms a boring classroom exercise into an interesting riddle.

Cheers, Daniel

### Re: Solution Process

Thanks my dear Danny. Yeah, due to the particular characteristics that that problem present, a straightforward solution is possible. As suggested by Jussi we encourage to Menzess to study the Chinese remainder which allows a more general approach to address broader problems of this type.
Shalom my friend,
perucho

### Re: Solution Process

Hi Menzess,
If you know congruences, you can use the Chinese remainder theorem.
A second way would be to list the integers
a) giving the remainder 4 when divided by 5; you have the list
4, 9, 14, 19, ...
b) giving the remainder 3 when divided by 5; you get
3, 7, 11, 15, ...
c) similarly
2, 5, 8, 11, ...
d) and finally the odd numbers
1, 3, 5, 7, ...
Then you see that the first number common to those four sequences is 59.
Regards,
pahio

### Re: Solution Process

Hi Menzess,
For the Chinese remainder theorem, look at