 One of the applications of number theory is something called the Chinese remainder problem, and this emerges as follows. The reason it's called the Chinese remainder problem is that it originated sometime probably around the 4th century with a mathematician by the name of Sun Xie, and he posed and solved the following problem. So I have some number of objects, and if I count these objects by 3s, I have 2 left over. If I count them by 5s, I have 3 left over, and if I count them by 7, I have 2 things left over. And so the question is, how many objects do I have? And this is actually, in modern terms, equivalent to trying to solve a system of simultaneous congruences. So what is that? Well, if I count them by 3 and I have 2 left over, that says however many objects I have is going to be congruent to 2 mod 3. Likewise, if I count by 5 and I have 3 left over, that tells me that however many objects I have is congruent to 3 mod 5. And then finally, if I count by 7s and I have 2 left over, that tells me that this number is going to be congruent to 2 mod 7. So now I have this system of simultaneous congruences, and I can solve this as follows. This appears to be Sun Xie's approach, although he gives the solution without too much commentary, but the reasoning seems to be the following. What I want to do is I'm going to find a number that's congruent to 1 mod 3, but also congruent to 0 mod 5 and 0 mod 7. And what that tells me, in order for it to be congruent to 0 mod 5, the number has to be a multiple of 5, and in order for the number to be congruent to 0 mod 7, it has to be a multiple of 7, which means that we should take a look at multiples of 5 times 7, multiples of 35. And so what I'm going to do is I'm just going to go through the list of multiples of 35 and see what they're congruent to mod 3. So 35 is congruent to 2 mod 3, 70, on the other hand, is congruent to 1 mod 3. I'm going to do the same thing for the other two congruences. So I want to look for something that's congruent to 1 mod 5, but also 0 mod 3, 0 mod 7. And what does that mean? Well, that tells me that I have to look among the multiples of 3 times 7, 21. So anything that's a multiple of 21 is going to be congruent to 0 mod 3 and also to 0 mod 7. So again, I'll just go through my list of multiples of 21, and in this case, the first one has it. So 21 is congruent to 1 mod 5. And then finally, I'll take a look at that last congruent. So I want to find a number that's congruent to 1 mod 7, but congruent to 0 mod 3 and 0 mod 5. So that tells me I want to look for multiples of 3 times 5, multiples of 15. And that's going to give me 15 turns out to be congruent to 1 mod 7. Now, here's why we did that. The thing to notice here, because 70 is congruent to 0 mod 5 and 0 mod 7, then any multiple of 70 will still be congruent to 0 mod 5, 0 mod 7. So I can take a look at multiples of 70 and see what happens to the congruences here. Now, I want this to be congruent to 2 mod 3, so I can look at 140 as congruent to 2 mod 3. Likewise, any multiple of 21 is still going to be congruent to 0 mod 3, 0 mod 7. And since I want my number to be congruent to 3 mod 5, I'm going to multiply by 3. And likewise for 7, I want something congruent to 2 mod 7, so I end up with this, 30. And here's where all of this got us. Because 63 is congruent to 0 mod 3, if I add 63 to this, I still have something that's congruent to 2 mod 3. Likewise, because 30 is congruent to 0 mod 3, if I add 30 to this, I still have something that's congruent to 2 mod 3. So if I add 63 and 30, it's still congruent to 2 mod 3. And I can do that for this row mod 5. I can add 140, which is the same as adding 0. I can add 30, again, same as adding 0. So I'll add that to the second congruence. And then likewise for the third congruence, I can add 140 and I can add 63. And that won't change the congruence of 7. So there I now have three numbers that satisfy my three congruences separately. This number is congruent to 2 mod 3. This number is congruent to 3 mod 5. This number is congruent to 2 mod 7. And those three numbers separately satisfy the congruence. And the thing to recognize is these are the same numbers, 140 plus 63 plus 30, 140 plus 63 plus 30, 140 plus 63 plus 30. All three of those numbers are actually the same number. In fact, they're all 233. And so there I have it. I have a number that's congruent to 2 mod 3 and also congruent to 3 mod 5 and also congruent to 2 mod 7. Now I can go one step farther here. Note that the product 3 times 5 times 7, 105, if I add or subtract 105, because this is congruent to 0 mod 3, 0 mod 5, 0 mod 7, adding or subtracting 105 won't change any of the congruences. So given one solution, I can find other solutions. And the solution that I'll be interested in, I'll subtract 105 repeatedly and find the smallest number that satisfies all three congruences simultaneously. Now let's take a look at another solution. So I'm going to look for the smallest positive solution to a number congruent to 3 mod 11, 5 mod 20, and 2 mod 9. So again, I'm going to look for numbers that are congruent to 1 mod 11 and 0 mod 20, 0 mod 9. So I'm going to look among multiples of 20 times 9, multiples of 180. And 180 is congruent to 4 mod 11, 360, 540, there we go. Likewise, I'm going to look for a number that's congruent to 1 mod 20, but 0 mod 11, 0 mod 9. So I'm going to look for multiples of 9 times 11, 99, and 99 isn't, but 1,881 is. We can find that by using the Euclidean algorithm or the multiplicative inverse. And finally, I want something that's congruent to 1 mod 9, but not 3 or 5 mod 11 and 20. And so that's going to be looking among the multiples of 220 and again 220, 4 mod 9, 1540, 1 mod 9. And again, I want a number that's congruent to 3 mod 11. So I'll multiply by 3. I want a number that's congruent to 5 mod 20. So I'll multiply by 5, 2 mod 9, I'll multiply by 2. And there I have my three numbers. And again, these two are both congruent to 0 mod 11. So if I add these two to the first number, I still have a number congruent to 3 mod 11. And likewise for the others. And again, all three numbers are actually the same number. And I can find the smallest positive solution by subtracting 11 times 20 times 9, 1,980 repeatedly.