Fermatβs Little Theorem
2020-2νκΈ°, λνμμ βνλλμ1β μμ μ λ£κ³ 곡λΆν λ°λ₯Ό μ 리ν κΈμ λλ€. μ§μ μ μΈμ λ νμμ λλ€ :)

μ°λ¦¬λ $\mathbb{Z}_n$μ΄ Ringμμ μ΄λ―Έ μκ³ μλ€.
κ·Έλ°λ°, μ΄ $\mathbb{Z}_n$μ μ¬μ€ μλμ Factor RingμΌλ‘λΆν° μ λλλ Ringμ΄λ€!
\[\mathbb{Z} / n \mathbb{Z} \cong \mathbb{Z}_n\]κ·Έλ¦¬κ³ μ°λ¦¬λ $\mathbb{Z}_p$μ κ²½μ° Ringλ³΄λ€ μμ λ¨κ³μΈ Fieldκ° λ¨μ νμΈνμλ€!!
$\mathbb{Z}_p$μμ κ³±μ μ λν κ΅°μΈ $\mathbb{Z}^{*}_p$λ₯Ό μκ°ν΄λ³΄μ.
\[\mathbb{Z}^{*}_p = \{1, 2, ..., p-1 \}\]μ¦, $\lvert \mathbb{Z}^{*}_p \rvert = p-1$μ΄λ€.
μ΄λ, $a \in \mathbb{Z}^{*}_p$μ λν΄ $a$μ μμλ $\mathbb{Z}^{*}_p$μ μμμ μ½μμ΄λ―λ‘ $\lvert a \rvert \mid (p-1)$κ° λλ€.
λ°λΌμ $a^{p-1} = 1$μ΄ λλ€.
μ΄κ²μ $\mathbb{Z}$μμ λ€μ μ°λ©΄ μλμ κ°λ€.
\[a^{p-1} \equiv 1 \quad (\textrm{mod} \; p)\]μ΄λ, $a$λ₯Ό $\mathbb{Z}^{*}_p$μμ λ½μμΌλ―λ‘ $a \not\equiv 0$ (mod $p$)μ΄λ€. μ¦, $p \not\mid a$μ΄λ€.
μμ μ¬μ€μ μ μ 리νμ¬ κΈ°μ ν κ²μ΄ λ°λ‘ Fermatβ Little Theoremμ΄λ€.
Fermatβs Little Theorem
Theorem. Fermatβs Little Theorem
Let $p$ be a prime,
If $a \in \mathbb{Z}$, and $p \not\mid a$,
then $p \mid (a^{p-1} + 1)$ $\iff$ $a^{p-1} \equiv 1$ (mod $p$).
μ΄λ, λ§μ½ $p \mid a$λΌλ©΄,
$a^{p-1} \equiv 0$ (mod $p$)κ° λλ€!
Corollary.
If $a \in \mathbb{Z}$, then $a^p \equiv a$ (mod $p$).
proof.
(Case 1) $p \mid a$
(Case 2) $p \not\mid a$
Examples
Example 1.
$8^{103} \equiv \; ?$ (mod 13)
Sol.
By Fermat-, $8^{12} \equiv 1$ (mod 13)
$\implies$ $(8^{12})^{8} \cdot 8^7 \equiv 1 \cdot 8^7$ (mod 13)
$\implies$ $8^7 \equiv (-5)^7 \equiv (25)^3 \cdot (-5)$
μ΄λ, $25 \equiv -1$ (mod 13) μ΄λ―λ‘
$\implies$ $(-1)^3 (-5) \equiv 5$ (mod 13)
Example 2.
$2^{11213} \equiv \; ?$ (mod 11)
Sol.
By Fermat-, $2^{10} \equiv 1$ (mod 11)
$(2^{10})^{1121} \cdot 2^3 \equiv 1 \cdot 8$ (mod 11)
Example 3.
Show that, for $\forall \; n \in \mathbb{N}$, $15 \mid (n^{33} - n)$.
Sol.
$15 \mid (n^{33} - n)$. μ¦, $n^{33} - n = n(n^{32} - 1) \equiv 0$ (mod 15)μμ 보μ΄λ©΄ λλ€.
μ΄λ, $15 = 3 \times 5$μ΄κ³ , Fermatμ μ 리μ λ°λ₯΄λ©΄
- for $3 \not\mid n$, $n^2 \equiv 1$ (mod 3)
- for $5 \not\mid n$, $n^4 \equiv 1$ (mod 5)
μ΄μ $n^{32}$λ₯Ό Fermat μ 리λ₯Ό μ΄μ©ν΄ νννλ©΄ μλμ κ°λ€.
- if $3 \not\mid n$, $n^{32} \equiv (n^2)^{16} \equiv 1$ (mod 3)
- if $5 \not\mid n$, $n^{32} \equiv (n^4)^{8} \equiv 1$ (mod 5)
μΌμ΄μ€λ₯Ό λλμ΄ $n^{32} - 1$μ λΆμν΄λ³΄μ.
1. $3 \not\mid n$ and $5 \not\mid n$
then, $3 \mid (n^{32} - 1)$ and $5 \mid (n^{32}-1)$μ μλ―Ένλ€.
λ°λΌμ $15 \mid (n^{32} - 1)$μ μ»λλ€.
λ°λΌμ $(n^{32} - 1) \equiv 0$ (mod 15)μ΄λ€.
2. $3 \mid n$ and $5 \mid n$
μ΄κ²μ $15 \mid n$λ₯Ό μλ―Ένλ―λ‘ $15 \mid n(n^{32}-1)$μ΄λ€.
3. $3 \not\mid n$ and $5 \mid n$
$3 \mid (n^{32} - 1)$μ΄λ―λ‘ $3 \mid n(n^{32} - 1)$μ΄λ€. λν, $5 \mid n(n^{32} - 1)$μ΄λ―λ‘
$15 \mid n(n^{32}-1)$μ΄λ€.
4. $3 \mid n$ and $5 \not\mid n$
3.μ κ²½μ°μ λ§μ°¬κ°μ§μ΄λ€.
Fermatβs Little Theoremμ Ringμ Multiplicative groupμΌλ‘λΆν° μ½κ² μ λν μ μλ μ±μ§μ΄μλ€ γ γ
ν.μ§.λ§.!
Euler νλμ΄ μ°λ¦¬λ₯Ό μν΄ FLTλ₯Ό μΌλ°ν ν΄μ£Όμ ¨λ€ γ γ