Chinese Remainder Theorem

Let be positive integers such that for . Then the linear congruence’s:

has a simultaneous solution, which is unique modulo the integer .

Example (Ancient Chinese Problem)

A band of 17 pirates stole a sack of gold coins. When they tried to divide the fortune into equal portions, 3 coins remained. In the ensuing brawl over who should get the extra coins, one pirate was killed. The wealth was redistributed, but this time an equal division left 10 coins. Again an argument developed in which another pirate was killed. But now the fortune was evenly distributed among the survivors. What was the least number of coins that could of been stolen

Let be the number of gold coins.

OR! if you kept , you will instantly get the calculation in less steps!