Inputs
Enter at least two congruences. You may add up to eight more.
Congruence 1
Any integer.
Integer ≥ 2.
Congruence 2
Any integer.
Integer ≥ 2.
Congruence 3 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Congruence 4 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Congruence 5 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Congruence 6 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Congruence 7 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Congruence 8 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Congruence 9 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Congruence 10 Optional
Any integer, or leave blank.
Integer ≥ 2, or leave blank.
Result
System of 3 congruences
23
x ≡ 23 (mod 105)
- Modulus N
- 105
- product of the moduli
- Congruences
- 3
- Folds
- 2
Pairwise combination steps
| Fold | Folding in | g = gcd(n, nᵢ) | Inverse used | Combined result |
|---|
Each fold combines the running solution x ≡ a (mod n) with the next congruence x ≡ aᵢ (mod nᵢ), using the inverse of n mod nᵢ (not the other way around) to find the new residue mod n · nᵢ. When g = gcd(n, nᵢ) > 1 the two congruences must agree modulo g (otherwise there is no solution); the inverse is then that of n/g mod nᵢ/g, and the new modulus is lcm(n, nᵢ) = n · nᵢ / g. A dash means nᵢ already divides n, so that congruence adds nothing new.