Advanced Number Theory

Study Sheet

Advanced Number Theory

CRT, orders, and totients

Systems of Congruences

Tip
Chinese Remainder Theorem

If the moduli are pairwise coprime, a system xai(modmi)x\equiv a_i\pmod{m_i} has a unique solution modulo mi\prod m_i.

In plain terms. Several "remainder" conditions with no shared factors always combine into a single condition — one remainder mod the product.

Example. x2(mod3)x\equiv 2\pmod 3 and x3(mod5)x\equiv 3\pmod 5 give x8(mod15)x\equiv 8\pmod{15} (check: 8=23+28 = 2\cdot3+2 and 8=5+38 = 5+3).

Orders and Totients

Tip
Euler's theorem and totient

If gcd(a,n)=1\gcd(a,n)=1, then aφ(n)1(modn)a^{\varphi(n)}\equiv 1\pmod n, where φ(n)=npn(11p)\varphi(n) = n\prod_{p\mid n}(1-\tfrac1p).

In plain terms. Like Fermat but for any modulus: raising to the "totient power" resets to 11. The totient counts how many numbers below nn share no factor with it.

Example. φ(10)=10(112)(115)=4\varphi(10) = 10(1-\tfrac12)(1-\tfrac15) = 4, so 34=811(mod10)3^4 = 81\equiv 1\pmod{10}.

Concept
Order of an element

The order of aa mod nn is the least d>0d>0 with ad1a^d\equiv 1, and it always divides φ(n)\varphi(n).

In plain terms. It is the length of the repeating cycle of powers of aa — and that length must divide the totient, which narrows the possibilities.

Example. Order of 22 mod 77: 2,4,1,2,4,1,\dots, so the order is 33, which divides φ(7)=6\varphi(7)=6.