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 4. What is the smallest possible value of N?
By Chinese Remainder Theorem, there exists a unique residue (mod315) for N. Hence, all we need to do is find a possible residue, and that will be the unique residue for N when taken (mod315). By N≡3≡−4(mod7) and N≡5≡−4(mod9), we get that N≡−4(mod63). Hence, N=63k+59 for some integer k.
Combining this with the last condition, we get 63k+59≡3k+4≡4(mod5), so 3k≡0(mod5). Multiplying both sides of this congruence by 2, we get that 6k≡k≡0(mod5), so hence k≡0(mod5). Thus, N≡63⋅0+59≡59(mod315).
Hence, we want to find the smallest four-digit N where N≡59(mod315), which gives us an answer of 315⋅3+59=1004.