1. ## Guess the number!

A two-digit number can be divided by 2, while divided by 3 will remain 1, divided by 4 will remain 2, divided by 5 will remain 3. What is the number?

I've tried to think like this:
all numbers that can be divided by 5 have a last digit of either 0 or 5. So, the second digit of n must be 3 or 8. Since n is completely divisible by 2, it is an even number, therefore the second digit of n must be 8.
n divided by 3 will remain 1, since the second digit is 8, the number that can still be divided by 3 must have a second digit of 7. The possible answers are 27, 57 and 87. So n can be 28, 58 or 88.
n divided by 4 will remain 2, the number that can still be divided by 4 must have a second digit of 6. The possible answers are 16, 36, 56, 76 and 96. So n can be 18, 38, 58, 78 or 98.
Since 58 is the only number appears twice, the answer is 58.

This is kinda messy and requires long calculation. So I was wondering if anyone can show me some more elegant way of solving it?

2. ## Re: Guess the number!

You don't really need to "guess", do you?

A two-digit number can be divided by 2,
So the number is of the form x= 2n for some integer n.

while divided by 3 will remain 1,
So x= 2n= 3m+ 1 for some integer m

divided by 4 will remain 2,
So x= 2n= 3m+ 1= 4i+ 2 for some integer I.

divided by 5 will remain 3.
So x= 2n= 3m+ 1= 4i+ 2= 5j+ 3

What is the number?
From x= 2n= 3m+ 1, we have the "Diophantine" equation 2n- 3m= 1. 2 divides into 3 once with remainder 1: 3- 2= 2(-1)- 3(-1)= 1 so one solution is n= -1, m= -1. But n= -1+ 3k, m= -1+ 2k is also a solution for every k: 2(-1+ 3k)= 3(-1+ 2k)+ 1 and then -2+ 6k= -3+ 6k+ 1 and, cancelling "6k", -2= -3+ 1, which is true, for all k. x= 2n= -2+ 6k.

From 2n= 4i+ 2, n= 2i+ 1 so -1+ 3k= 2i+ 1 which gives the "Diophantine" equation 3k- 2i= 2. Again, 3(1)- 2(1)= 1 so, multiplying by 2, 3(2)- 2(2)= 2. One solution is i= 2, k= 2 but, again, i= 2+ 3p, k= 2+ 2p is also a solution. Since n= -1+ 3k, n= -1+ 3(2+ 2p)= 5+ 6p and x= 2n= 10+ 12p.

From 2n= 5j+ 3 we have 2(5+ 6p)= 10+ 12p= 5j+ 3 which gives the "Diophantine" equation 5j- 12p= 7. 5 divides into 12 twice with remainder 2: 12- 2(5)= 2. 2 divides into 5 twice with remainder 1: 5- 2(2)= 1 so 5- 2(12- 2(5))= 5(5)- 12(2)= 1. Multiplying by 7. 5(35)- 12(14)= 7. So one solution is j= 35, p= 14. Again, j= 35+ 12q, p= 14+ 5q is a solution for any integer q. Then n= 5+ 6p gives n= 5+ 6(14+ 5q)= 5+ 84+ 30q= 89+ 30 q for all integers q. Taking q= -2, the smallest positive value of n is 89- 60= 29. Then x= 2n= 58.