dubiumlabsMathematics

Number theory

Chinese Remainder Theorem: Congruence Systems

Find the integers that satisfy every remainder at once. Build the solution step by step, or prove why none exists.

Classical case · coprime moduli. Solution updated: satisfies all 3 congruences.

System of congruences

Divided by 3, 5 and 7 the remainders are 2, 3 and 2. Which numbers satisfy all three conditions?

Enter 2 to 12 congruences. Each value accepts up to 40 significant digits; moduli must be integers ≥ 2.

  1. Row 1
  2. Row 2
  3. Row 3

Classical case · coprime moduli

Solution class

x ≡ 23 (mod 105)

All solutions

x = 23 + k·105, k ∈ ℤ

The period is the least common multiple of the moduli.

Five representatives of the same class

k = −2
−187
k = −1
−82
k = 0
23
k = 1
128
k = 2
233

Satisfies all 3 congruences

Working

From the existence condition to checking the result.

How is that class obtained?

With pairwise coprime moduli there are two routes: the direct formula with inverses, or merging step by step.

N is the product; Nᵢ = N/nᵢ; uᵢ is the inverse of Nᵢ modulo nᵢ. Each term contributes its remainder without disturbing the others.

Product of moduli · N: 105

Direct construction
aᵢnᵢNᵢuᵢ · InverseaᵢNᵢuᵢ · Term
23352140
3521163
2715130

Sum and reduction

S = 140 + 63 + 30 = 233

x₀ = 233 mod 105 = 23

Fundamentals & Explanation