CRT
If are pairwise coprime, the system has exactly one solution mod . To find it: solve two at a time, substituting into the second congruence and solving for .
The theorem says that knowing a number mod and mod is the same as knowing it mod — no more, no less. Write in a table by their two remainders and every cell gets exactly one number. That is why problems about a composite modulus split into prime-power pieces (Euler's theorem on each, then reassemble), and why and are multiplicative. It is also how a computer can do arithmetic on huge integers by working mod several small primes at once.
Solve , . The first says . Put that into the second: , so , and gives . Then , and the solution is — the single cell in row , column of the table.
, , . The first two combine to , as above. Mod : , so . . Check: . ✓
Counting eggs by s, s, s, s or s always leaves ; by s leaves none. Fewest eggs? The first five conditions say is a multiple of : . Mod : , so , and gives . So .
Keeping the number but dropping the family. After the first two congruences the answer is not "" but " for all "; replacing it by alone and testing mod () wrongly suggests the system has no solution. Carry the modulus along until the last step.
Find the smallest positive with and .
Show the answerHide the answer
; mod : , , and since (), . . Check: . ✓
Moduli That Share a Factor
If the moduli share factors, the system , has a solution iff , and the solution is then unique mod — not mod .
Both congruences say something about , and those two statements must agree. With and , both moduli are even, so both congruences fix the parity of ; the table has only reachable cells, the ones whose row and column have the same parity. The count is the period of the combined pattern.
Solve , . Here , and and are both odd: consistent. From : gives , i.e. , so . Then : the answer is : the shaded cell in row , column of the table of .
Solve , . , and : consistent. gives , i.e. , . So : . Check: . ✓
Solve , . The first makes even, the second makes odd. No integer is both: no solution. The substitution method agrees: asks for , impossible since .
Claiming uniqueness mod the product when the moduli are not coprime. For and there are TWO solutions below , namely and : the answer repeats every , not every .
Solve , .
Show the answerHide the answer
, and : consistent. gives , so and . : . Check: . ✓
Computing with CRT
To compute something mod a composite with , compute it mod and mod separately — often much easier, for instance by Fermat on each prime — and then combine the two remainders with CRT. The number of solutions of a polynomial congruence mod is the product of the numbers mod each coprime factor.
CRT says the pair (remainder mod , remainder mod ) is a complete, faithful description of a residue mod , and it respects addition and multiplication. So any computation can be carried out in the two small worlds in parallel. Counting follows too: if has solutions mod and mod , each pair of choices assembles into exactly one solution mod .
Split . Mod : (Fermat), so . Mod : and , so . Combine , : the candidates are , and . So .
Mod . Mod : . Mod : and , so . Combine , : try — the first multiple of is . So ends in .
Solve . Mod the solutions are (two), and mod also (two), so there are solutions mod , one for each pair of signs: , , , . Check: and . A prime modulus allows only ; a composite one allows more.
Applying Euler to the whole modulus when the base is not coprime to it. ", so " is unjustified, since . Splitting off the factor , where the power of is simply , is what makes the computation legitimate.
Find all with and .
Show the answerHide the answer
Mod : ; mod : (since is prime). Four combinations: ; gives ; gives ; and . Solutions ; check .
Why It Works
Consider the map from residues mod to -tuples of residues . It is injective: if two residues agree mod every , each divides their difference, and since the are pairwise coprime so does their product — so the residues are equal mod . Both sides have exactly elements ( residues; tuples), and an injection between finite sets of the same size is a bijection. Hence every tuple of remainders is hit exactly once: existence and uniqueness together, with no formula needed.