跳到主要内容

A.6 · 同余、整除与算术函数

GRE 数学 · 知识点 12

本主题的视频课程 打开视频页面
5:36

A.6 · 同余、整除与算术函数

在 1977 年 8 月,马丁·加德纳在《科学美国人》上的专栏刊登了一条用新方法 RSA 加密的信息。RSA 由罗恩·里维斯特、阿迪·萨莫尔……于当年发明。

英文讲解 · 可切换中英文字幕

12.1

同余、整除性与算术函数

English

In August 1977 Martin Gardner's column in Scientific American printed a message encrypted with a new method, RSA, invented that year by Ron Rivest, Adi Shamir and Leonard Adleman. To read it, you would need to factor a 129-digit number. The authors offered $100 and estimated that, with the methods of the day, it would take 40 quadrillion years. In 1994 about 600 volunteers sharing their computers over the internet factored it, and the message read: "The magic words are squeamish ossifrage." RSA rests on congruence 同余 arithmetic and Euler's totient 欧拉函数.

GRE Mathematics number theory questions ask you to:

  • Solve linear congruences and find inverses modulo $n$.
  • Use the Chinese remainder theorem.
  • Apply Fermat's and Euler's theorems, and Wilson's theorem.
  • Compute arithmetic functions such as $\varphi$, $\tau$ and $\sigma$.
词汇 训练
English 中文 拼音
congruence/ˈkɒŋɡruːəns/ 同余 tóng yú
totient/ˈtəʊʃənt/ 欧拉函数 ōu lā hán shù
12.2

同余

English

$a \equiv b \pmod n$ means $n$ divides $a - b$.

  • $ax \equiv b \pmod n$ has a solution exactly when $d = \gcd(a, n)$ divides $b$. Then it has $d$ solutions modulo $n$, spaced $n/d$ apart.
  • To solve, divide $a$, $b$ and $n$ by $d$, solve the smaller congruence, and list the lifts.
  • $a$ has an inverse modulo $n$ exactly when $\gcd(a, n) = 1$; find it with the Euclidean algorithm.
A clock of residues 0 to 14 with 4, 9 and 14 highlighted: 6x is congruent to 9 mod 15 has gcd 3 solutions spaced 5 apart
d = gcd(a, n) solutions, n/d apart.
12.3

中国剩余定理

English

If $m$ and $n$ are coprime, the system $x \equiv a \pmod m$, $x \equiv b \pmod n$ has exactly one solution modulo $mn$.

  • Equivalently, $\mathbb Z/mn\mathbb Z \cong \mathbb Z/m\mathbb Z \times \mathbb Z/n\mathbb Z$.
  • If $m$ and $n$ share a factor, a solution exists only when $a \equiv b$ modulo $\gcd(m, n)$.
12.4

费马、欧拉和威尔逊

English
  • Euler: if $\gcd(a, n) = 1$, then $a^{\varphi(n)} \equiv 1 \pmod n$. For a prime $p$ this is Fermat's little theorem, $a^{p-1} \equiv 1$.
  • Wilson: $p$ is prime exactly when $(p - 1)! \equiv -1 \pmod p$.
  • These theorems need their conditions: Euler's needs $a$ to be a unit.
12.5

算术函数

English

If $n = p_1^{a_1}\cdots p_k^{a_k}$:

$$\varphi(n) = n\prod\left(1 - \frac{1}{p_i}\right), \qquad \tau(n) = \prod(a_i + 1), \qquad \sigma(n) = \prod\frac{p_i^{a_i + 1} - 1}{p_i - 1}$$
  • $\varphi$ counts residues coprime to $n$; $\tau$ counts divisors; $\sigma$ adds them.
  • All three are multiplicative: $f(mn) = f(m)f(n)$ when $\gcd(m, n) = 1$.
12.6

例题:有多个解的同余式

English

Solve $8x \equiv 12 \pmod{20}$.

  • $\gcd(8, 20) = 4$, which divides 12, so there are 4 solutions.
  • Divide by 4: $2x \equiv 3 \pmod 5$, so $x \equiv 4 \pmod 5$ (since $2 \times 4 = 8 \equiv 3$).
  • Modulo 20: $x = 4, 9, 14, 19$. Check: $8 \times 9 = 72 = 60 + 12$.
Table: x = 4, 9 and 14 modulo 15 all give 6x ≡ 9
Solve 2x ≡ 3 (mod 5) to get x ≡ 4, then lift to three solutions modulo 15
12.7

例题:逆元与欧拉

English
  • The inverse of 7 modulo 20 is 3, since $21 \equiv 1$.
  • $\varphi(20) = 20 \times \tfrac12 \times \tfrac45 = 8$, so $7^8 \equiv 1 \pmod{20}$.
  • But $2^8 = 256 \equiv 16 \pmod{20}$, not 1: Euler's theorem does not apply, because $\gcd(2, 20) = 2$.
  • CRT: $x \equiv 2 \pmod 3$ and $x \equiv 3 \pmod 5$ give $x \equiv 8 \pmod{15}$.
12.8

常见错误

English
  • Dividing a congruence by a number that shares a factor with the modulus, without dividing the modulus.
  • Giving one solution when there are $\gcd(a, n)$ of them.
  • Using Euler's theorem for a non-unit.
  • Using the Chinese remainder theorem with moduli that are not coprime.
  • Forgetting that $\varphi$ is multiplicative only for coprime factors.
12.9

关键术语

English

congruence: The relation $a \equiv b \pmod n$, meaning $n$ divides $a - b$.

totient: Euler's function $\varphi(n)$, the number of residues from 1 to $n$ that are coprime to $n$.

12.10

自我检测

English
  • What is $\varphi(36)$?
  • What is $6! \bmod 7$?
  • How many positive divisors does 72 have?

Answers: $36 \times \tfrac12 \times \tfrac23 = 12$. 6, that is $-1$, as Wilson's theorem says. $(3 + 1)(2 + 1) = 12$.

这有帮助吗?

该知识点的互动课程

逐步完成,配合即时检查练习。

更多 GRE 数学 知识点

登录或创建账户

IGCSE, A-Level & AP