N is a four-digit positive integer. Dividing N by 9 , the remainder is 5. Dividing N by 7, the remainder is 3. Dividing N by 5, the remainder is 2. What is the smallest possible value of N?
Using Chinese Remainder Theorem, the answer is 1,067
1008 mod 9 = 0
need = 5 so start with 1013 (1008 +5)
then continue adding 9's
1022 looking for easily seen remainder two when divided by 5
but 1022 does not have remainder 3 when divided by 7 so continue ading 9's
1031
1040
1049
1058
1067 <===== mod 9 =5 mod 7 = 3 mod 5 = 2