初等数论
一、整除
1. 定义
设 a,b∈Z,a≠0a, b \in Z, a \neq 0a,b∈Z,a=0 ,若 ∃q∈Z\exist q \in Z∃q∈Z ,使得 b=aqb = aqb=aq ,则有 bbb 能被 aaa 整除,记作 a∣ba \mid ba∣b ,且称 bbb 是 aaa 的因数,aaa 是 bbb 的约数,反之即 bbb 不能被 aaa 整除,则记为 a∤ba \nmid ba∤b ;
2. 性质
性质1
若 a∣ba \mid ba∣b 且 b∣cb \mid cb∣c ,则 a∣ca \mid ca∣c ;
证明如下,
∵a∣b 则令 ax=b(x∈Z 且 x≠0) b∣c 则令 by=c(y∈Z 且 y≠0)∴axy=c(x,y∈Z 且 x,y≠0)∴a∣c \begin{aligned} & \because a \mid b \; 则令 \; ax = b (x \in Z \; 且 \; x \neq 0) \\ & \quad \; b \mid c \; 则令 \; by = c (y \in Z \; 且 \; y \neq 0) \\ & \therefore axy = c (x, y \in Z \; 且 \; x, y \neq 0) \\ & \therefore a \mid c \end{aligned} ∵a∣b则令ax=b(x∈Z且x=0)b∣c则令by=c(y∈Z且y=0)∴axy=c(x,y∈Z且x,y=0)∴a∣c
性质2
a∣ba \mid ba∣b 且 a∣ca \mid ca∣c 等价于对 ∀Zx,y\forall Z x, y∀Zx,y ,有 a∣(bx+cy)a \mid (bx + cy)a∣(bx+cy) ;
证明如下,
∵a∣b 则令 ap=b(p∈Z 且 p≠0) a∣c 则令 aq=c(q∈Z 且 q≠0)又∵bx+cy=apx+aqy=a(px+qy)又∵a∣(a(px+qy))∴a∣(bx+cy) \begin{aligned} & \because a \mid b \; 则令 \; ap = b (p \in Z \; 且 \; p \neq 0) \\ & \quad \; a \mid c \; 则令 \; aq = c (q \in Z \; 且 \; q \neq 0) \\ & 又\because bx + cy = apx + aqy = a(px + qy) \\ & 又\because a \mid (a(px + qy)) \\ & \therefore a \mid (bx + cy) \end{aligned} ∵a∣b则令ap=b(p∈Z且p=0)a∣c则令aq=c(q∈Z且q=0)又∵bx+cy=apx+aqy=a(px+qy)又∵a∣(a(px+qy))∴a∣(bx+cy)
性质3
设 m≠0m \neq 0m=0 ,则 a∣ba \mid ba∣b 等价于 (ma)∣(mb)(ma) \mid (mb)(ma)∣(mb) ;
证明如下,
∵a∣b 则令 aq=b(p∈Z 且 p≠0)∴aqm=bm∴(ma)∣(mb) \begin{aligned} & \because a \mid b \; 则令 \; aq = b (p \in Z \; 且 \; p \neq 0) \\ & \therefore aqm = bm \\ & \therefore (ma) \mid (mb) \end{aligned} ∵a∣b则令aq=b(p∈Z且p=0)∴aqm=bm∴(ma)∣(mb)
性质4
设有 x,y∈Zx, y \in Zx,y∈Z 满足 ax+by=1ax + by = 1ax+by=1 ,且 a∣n,b∣na \mid n, b \mid na∣n,b∣n ,则 (ab)∣n(ab) \mid n(ab)∣n ;
证明如下,
∵a∣n,b∣n∴(ab)∣(nb),(ab)∣(na)∴(ab)∣(nby+nax)∴(ab)∣(n(by+ax))∴(ab)∣n \begin{aligned} & \because a \mid n, b \mid n \\ & \therefore (ab) \mid (nb), (ab) \mid (na) \\ & \therefore (ab) \mid (nby + nax) \\ & \therefore (ab) \mid (n(by + ax)) \\ & \therefore (ab) \mid n \\ \end{aligned} ∵a∣n,b∣n∴(ab)∣(nb),(ab)∣(na)∴(ab)∣(nby+nax)∴(ab)∣(n(by+ax))∴(ab)∣n
性质5
若 b=qd+c,q∈Zb = qd + c, q \in Zb=qd+c,q∈Z ,则 d∣bd \mid bd∣b 的充分必要条件为 d∣cd \mid cd∣c ;
证明如下,
-
证明必要性,即 b=qd+c,q∈Zb = qd + c, q \in Zb=qd+c,q∈Z 且 d∣bd \mid bd∣b 可得 d∣cd \mid cd∣c ;
∵d∣b 则令 dx=b(x∈Z 且 x≠0)∴dx=qd+c∴d(x−q)=c∴d∣c \begin{aligned} & \because d \mid b \; 则令 \; dx = b (x \in Z \; 且 \; x \neq 0) \\ & \therefore dx = qd + c \\ & \therefore d(x - q) = c \\ & \therefore d \mid c \end{aligned} ∵d∣b则令dx=b(x∈Z且x=0)∴dx=qd+c∴d(x−q)=c∴d∣c
-
证明充分性,即 b=qd+c,q∈Zb = qd + c, q \in Zb=qd+c,q∈Z 且 d∣cd \mid cd∣c 可得 d∣bd \mid bd∣b ;
∵d∣c 则令 dx=c(x∈Z 且 x≠0)∴b=qd+xd∴d(x+q)=b∴d∣b \begin{aligned} & \because d \mid c \; 则令 \; dx = c (x \in Z \; 且 \; x \neq 0) \\ & \therefore b = qd + xd \\ & \therefore d(x + q) = b \\ & \therefore d \mid b \end{aligned} ∵d∣c则令dx=c(x∈Z且x=0)∴b=qd+xd∴d(x+q)=b∴d∣b
二、模运算
1. 定义
对于 a,b∈Z,b≠0a, b \in Z, b \neq 0a,b∈Z,b=0 , a÷ba \div ba÷b 的余数即为 aaa 模 bbb ,记作 a mod ba \; mod \; bamodb ;
2. 性质
分配律
-
加法, (a+b) mod c=(a mod c+b mod c) mod c(a + b) \; mod \; c = (a \; mod \; c + b \; mod \; c) \; mod \; c(a+b)modc=(amodc+bmodc)modc ;
证明如下,
设a=cp+x(p,x∈Z,0≤x<c)b=cq+y(q,y∈Z,0≤y<c)∴(a+b) mod c=(c(p+q)+x+y) mod c=(x+y) mod c∴(a+b) mod c=(a mod c+b mod c) mod c \begin{aligned} & 设 a = cp + x (p, x \in Z, 0 \leq x < c) \\ & \quad b = cq + y (q, y \in Z, 0 \leq y < c) \\ & \therefore (a + b) \; mod \; c = (c(p + q) + x + y) \; mod \; c = (x + y) \; mod \; c \\ & \therefore (a + b) \; mod \; c = (a \; mod \; c + b \; mod \; c) \; mod \; c \end{aligned} 设a=cp+x(p,x∈Z,0≤x<c)b=cq+y(q,y∈Z,0≤y<c)∴(a+b)modc=(c(p+q)+x+y)modc=(x+y)modc∴(a+b)modc=(amodc+bmodc)modc
-
减法,(a−b) mod c=(a mod c−b mod c) mod c(a - b) \; mod \; c = (a \; mod \; c - b \; mod \; c) \; mod \; c(a−b)modc=(amodc−bmodc)modc ;
证明如下,
设a=cp+x(p,x∈Z,0≤x<c)b=cq+y(q,y∈Z,0≤y<c)∴(a−b) mod c=(c(p−q)+x−y) mod c=(x−y) mod c∴(a−b) mod c=(a mod c−b mod c) mod c \begin{aligned} & 设 a = cp + x (p, x \in Z, 0 \leq x < c) \\ & \quad b = cq + y (q, y \in Z, 0 \leq y < c) \\ & \therefore (a - b) \; mod \; c = (c(p - q) + x - y) \; mod \; c = (x - y) \; mod \; c \\ & \therefore (a - b) \; mod \; c = (a \; mod \; c - b \; mod \; c) \; mod \; c \end{aligned} 设a=cp+x(p,x∈Z,0≤x<c)b=cq+y(q,y∈Z,0≤y<c)∴(a−b)modc=(c(p−q)+x−y)modc=(x−y)modc∴(a−b)modc=(amodc−bmodc)modc
-
乘法,(ab) mod c=(a mod c×b mod c) mod c(ab) \; mod \; c = (a \; mod \; c \times b \; mod \; c) \; mod \; c(ab)modc=(amodc×bmodc)modc ;
证明如下,
设a=cp+x(p,x∈Z,0≤x<c)b=cq+y(q,y∈Z,0≤y<c) (ab) mod c=((cp+x)∗(cq+y)) mod c=(ccpq+cpy+cqx+xy) mod c=xy mod c=(a mod c×b mod c) mod c \begin{aligned} & 设 a = cp + x (p, x \in Z, 0 \leq x < c) \\ & \quad b = cq + y (q, y \in Z, 0 \leq y < c) \\ & \quad \; (ab) \; mod \; c \\ & = ((cp + x) * (cq + y)) \; mod \; c \\ & = (ccpq + cpy + cqx + xy) \; mod \; c \\ & = xy \; mod \; c \\ & = (a \; mod \; c \times b \; mod \; c) \; mod \; c \end{aligned} 设a=cp+x(p,x∈Z,0≤x<c)b=cq+y(q,y∈Z,0≤y<c)(ab)modc=((cp+x)∗(cq+y))modc=(ccpq+cpy+cqx+xy)modc=xymodc=(amodc×bmodc)modc
-
扩展,(ab) mod c=(a mod c)b mod c(a^b) \; mod \; c = (a \; mod \; c)^b \; mod \; c(ab)modc=(amodc)bmodc ;
放缩性
-
乘法,有 a mod b=c,d≠0a \; mod \; b = c, d \neq 0amodb=c,d=0 ,则有 (ad) mod (bd)=cd(ad) \; mod \; (bd) = cd(ad)mod(bd)=cd ;
证明如下,
∵a mod b=c 则令 a=bx+c(x∈Z)∴ad=bdx+cd∴(bdx+cd) mod (bd)=cd∴(ad) mod (bd)=cd \begin{aligned} & \because a \; mod \; b = c \; 则令 \; a = bx + c (x \in Z) \\ & \therefore ad = bdx + cd \\ & \therefore (bdx + cd) \; mod \; (bd) = cd \\ & \therefore (ad) \; mod \; (bd) = cd \end{aligned} ∵amodb=c则令a=bx+c(x∈Z)∴ad=bdx+cd∴(bdx+cd)mod(bd)=cd∴(ad)mod(bd)=cd
-
除法,有 a mod b=c,d≠0a \; mod \; b = c, d \neq 0amodb=c,d=0 ,则有 (ad) mod (bd)=cd(\frac{a}{d}) \; mod \; (\frac{b}{d}) = \frac{c}{d}(da)mod(db)=dc ;
3. 推论
推论1
若 2 能整除 aaa 的最末位 (0 能被 ∀Z\forall Z∀Z 整除) ,则 aaa 能被 2 整除;
证明如下,
设 a=10x+y(x,y∈Z+,0≤y≤9)∴2∣y又∵a mod 2=(10x mod 2+y mod 2) mod 2=0∴2∣a \begin{aligned} & 设 \; a = 10x + y (x, y \in Z^{+}, 0 \leq y \leq 9) \\ & \therefore 2 \mid y \\ & 又\because a \; mod \; 2 = (10x \; mod \; 2 + y \; mod \; 2) \; mod \; 2 = 0 \\ & \therefore 2 \mid a \end{aligned} 设a=10x+y(x,y∈Z+,0≤y≤9)∴2∣y又∵amod2=(10xmod2+ymod2)mod2=0∴2∣a
推论2
若 4 能整除 aaa 的最末 2 位 (0 能被 ∀Z\forall Z∀Z 整除) ,则 aaa 能被 4 整除;
证明如下,
设 a=100x+y(x,y∈Z+,0≤y≤99)∴4∣y又∵a mod 4=(100x mod 4+y mod 4) mod 4=0∴4∣a \begin{aligned} & 设 \; a = 100x + y (x, y \in Z^{+}, 0 \leq y \leq 99) \\ & \therefore 4 \mid y \\ & 又\because a \; mod \; 4 = (100x \; mod \; 4 + y \; mod \; 4) \; mod \; 4 = 0 \\ & \therefore 4 \mid a \end{aligned} 设a=100x+y(x,y∈Z+,0≤y≤99)∴4∣y又∵amod4=(100xmod4+ymod4)mod4=0∴4∣a
推论3
若 8 能整除 aaa 的最末 3 位 (0 能被 ∀Z\forall Z∀Z 整除) ,则 aaa 能被 8 整除;
证明如下,
设 a=1000x+y(x,y∈Z+,0≤y≤999)∴8∣y又∵a mod 8=(1000x mod 8+y mod 8) mod 8=0∴8∣a \begin{aligned} & 设 \; a = 1000x + y (x, y \in Z^{+}, 0 \leq y \leq 999) \\ & \therefore 8 \mid y \\ & 又\because a \; mod \; 8 = (1000x \; mod \; 8 + y \; mod \; 8) \; mod \; 8 = 0 \\ & \therefore 8 \mid a \end{aligned} 设a=1000x+y(x,y∈Z+,0≤y≤999)∴8∣y又∵amod8=(1000xmod8+ymod8)mod8=0∴8∣a
推论4
若 3 能整除 aaa 的各个数位之和,则 aaa 能被 3 整除;
证明如下,以 3 位数为例,
设 a=xyz‾ (x,y,z∈Z+,1≤x≤9,0≤y,z≤9)∴(x+y+z) mod 3=0∴xyz‾ mod 3=(100x+10y+z) mod 3=100x mod 3+10y mod 3+z mod 3=x mod 3+y mod 3+z mod 3=0∴3∣a \begin{aligned} & 设 \; a = \overline{xyz} \; (x, y, z \in Z^{+}, 1 \leq x \leq 9, 0 \leq y,z \leq 9) \\ & \therefore (x + y + z) \; mod \; 3 = 0 \\ & \therefore \overline{xyz} \; mod \; 3 \\ & = (100x + 10 y + z) \; mod \; 3 \\ & = 100x \; mod \; 3 + 10y \; mod \; 3 + z \; mod \; 3 \\ & = x \; mod \; 3 + y \; mod \; 3 + z \; mod \; 3 \\ & = 0 \\ & \therefore 3 \mid a \end{aligned} 设a=xyz(x,y,z∈Z+,1≤x≤9,0≤y,z≤9)∴(x+y+z)mod3=0∴xyzmod3=(100x+10y+z)mod3=100xmod3+10ymod3+zmod3=xmod3+ymod3+zmod3=0∴3∣a
推论5
若 9 能整除 aaa 的各个数位之和,则 aaa 能被 9 整除;
证明如下,以 3 位数为例,
设 a=xyz‾ (x,y,z∈Z+,1≤x≤9,0≤y,z≤9)∴(x+y+z) mod 9=0∴xyz‾ mod 9=(100x+10y+z) mod 9=100x mod 9+10y mod 9+z mod 9=x mod 9+y mod 9+z mod 9=0∴9∣a \begin{aligned} & 设 \; a = \overline{xyz} \; (x, y, z \in Z^{+}, 1 \leq x \leq 9, 0 \leq y,z \leq 9) \\ & \therefore (x + y + z) \; mod \; 9 = 0 \\ & \therefore \overline{xyz} \; mod \; 9 \\ & = (100x + 10 y + z) \; mod \; 9 \\ & = 100x \; mod \; 9 + 10y \; mod \; 9 + z \; mod \; 9 \\ & = x \; mod \; 9 + y \; mod \; 9 + z \; mod \; 9 \\ & = 0 \\ & \therefore 9 \mid a \end{aligned} 设a=xyz(x,y,z∈Z+,1≤x≤9,0≤y,z≤9)∴(x+y+z)mod9=0∴xyzmod9=(100x+10y+z)mod9=100xmod9+10ymod9+zmod9=xmod9+ymod9+zmod9=0∴9∣a
推论6
若 11 能整除 aaa 的奇数数位与偶数数位的差,则 aaa 能被 11 整除;
证明如下,以 5 位数为例,
设 a=x1x2x3x4x5‾ (x1,x2,x3,x4,x5∈Z+,1≤x1≤9,0≤x2,x3,x4,x5≤9)∴(x1+x3+x5−x2−x4) mod 11=0∴x1x2x3x4x5‾ mod 11=((9999+1)x1+(1001−1)x2+(99+1)x3+(11−1)x4+x5) mod 11=(x1−x2+x3−x4+x5) mod 11=0∴11∣a \begin{aligned} & 设 \; a = \overline{x_1x_2x_3x_4x_5} \; (x_1, x_2, x_3, x_4, x_5 \in Z^{+}, 1 \leq x_1 \leq 9, 0 \leq x_2, x_3, x_4, x_5 \leq 9) \\ & \therefore (x_1 + x_3 + x_5 - x_2 - x_4) \; mod \; 11 = 0 \\ & \therefore \overline{x_1x_2x_3x_4x_5} \; mod \; 11 \\ & = ((9999 + 1)x_1 + (1001 - 1)x_2 + (99 + 1)x_3 + (11 - 1)x_4 + x_5) \; mod \; 11 \\ & = (x_1 - x_2 + x_3 - x_4 + x_5) \; mod \; 11 \\ & = 0 \\ & \therefore 11 \mid a \end{aligned} 设a=x1x2x3x4x5(x1,x2,x3,x4,x5∈Z+,1≤x1≤9,0≤x2,x3,x4,x5≤9)∴(x1+x3+x5−x2−x4)mod11=0∴x1x2x3x4x5mod11=((9999+1)x1+(1001−1)x2+(99+1)x3+(11−1)x4+x5)mod11=(x1−x2+x3−x4+x5)mod11=0∴11∣a
推论7
若 7, 11, 13 能整除 aaa 的末 3 位与末 3 位以前的数字所组成的数的差,则 aaa 能被 7, 11, 13 整除;
证明如下,以 5 位数为例,
设 a=x1x2x3x4x5‾ (x1,x2,x3,x4,x5∈Z+,1≤x1≤9,0≤x2,x3,x4,x5≤9)∴x3x4x5‾−x1x2‾ mod 1001=0∴x1x2x3x4x5‾ mod 1001=(x1x2‾∗1000+x3x4x5‾) mod 1001=(−x1x2‾+x3x4x5‾) mod 1001=0∴1001∣a \begin{aligned} & 设 \; a = \overline{x_1x_2x_3x_4x_5} \; (x_1, x_2, x_3, x_4, x_5 \in Z^{+}, 1 \leq x_1 \leq 9, 0 \leq x_2, x_3, x_4, x_5 \leq 9) \\ & \therefore \overline{x_3x_4x_5} - \overline{x_1x_2} \; mod \; 1001 = 0 \\ & \therefore \overline{x_1x_2x_3x_4x_5} \; mod \; 1001 \\ & = (\overline{x_1x_2} * 1000 + \overline{x_3x_4x_5}) \; mod \; 1001 \\ & = (-\overline{x_1x_2} + \overline{x_3x_4x_5}) \; mod \; 1001 \\ & = 0 \\ & \therefore 1001 \mid a \end{aligned} 设a=x1x2x3x4x5(x1,x2,x3,x4,x5∈Z+,1≤x1≤9,0≤x2,x3,x4,x5≤9)∴x3x4x5−x1x2mod1001=0∴x1x2x3x4x5mod1001=(x1x2∗1000+x3x4x5)mod1001=(−x1x2+x3x4x5)mod1001=0∴1001∣a
三、同余
1. 定义
若 a,b∈Z,m∈Z+a, b \in Z,m \in Z^{+}a,b∈Z,m∈Z+ ,且 m∣(a−b)m \mid (a - b)m∣(a−b) ,或 a=b+km(k∈Z)a = b + km (k \in Z)a=b+km(k∈Z) 则称 aaa 与 bbb 模 mmm 同余,记为 a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) ;
证明 m∣(a−b)⇔a≡b(mod m)m \mid (a - b) \Leftrightarrow a \equiv b (mod \; m)m∣(a−b)⇔a≡b(modm) 如下,
∵m∣(a−b)∴m(q1−q2)=a−b(q1,q2∈Z)∴a−mq1=b−mp2=r∴a=mq1+r,b=mp2+r∴a≡b(mod m) \begin{aligned} & \because m \mid (a - b) \\ & \therefore m(q_1 - q_2) = a - b (q_1, q_2 \in Z) \\ & \therefore a - mq_1 = b - mp_2 = r \\ & \therefore a = mq_1 + r, b = mp_2 + r \\ & \therefore a \equiv b (mod \; m) \\ \end{aligned} ∵m∣(a−b)∴m(q1−q2)=a−b(q1,q2∈Z)∴a−mq1=b−mp2=r∴a=mq1+r,b=mp2+r∴a≡b(modm)
2. 性质
自反性
a≡a(mod m)a \equiv a (mod \; m)a≡a(modm) ;
证明如下,
∵m∣(a−a)∴a≡a(mod m) \begin{aligned} & \because m \mid (a - a) \\ & \therefore a \equiv a (mod \; m) \end{aligned} ∵m∣(a−a)∴a≡a(modm)
对称性
a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) 则 b≡a(mod m)b \equiv a (mod \; m)b≡a(modm) ;
证明如下,
∵a≡b(mod m)∴m∣(a−b)∴m∣(b−a)∴b≡a(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore m \mid (a - b) \\ & \therefore m \mid (b - a) \\ & \therefore b \equiv a (mod \; m) \end{aligned} ∵a≡b(modm)∴m∣(a−b)∴m∣(b−a)∴b≡a(modm)
传递性
若 a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) 且 b≡c(mod m)b \equiv c (mod \; m)b≡c(modm) ,则 a≡c(mod m)a \equiv c (mod \; m)a≡c(modm) ;
证明如下,
∵m∣(a−b),m∣(b−c)∴m∣(a−b+b−c)∴m∣(a−c)∴a≡c(mod m) \begin{aligned} & \because m \mid (a - b), m \mid (b - c) \\ & \therefore m \mid (a - b + b - c) \\ & \therefore m \mid (a - c) \\ & \therefore a \equiv c (mod \; m) \end{aligned} ∵m∣(a−b),m∣(b−c)∴m∣(a−b+b−c)∴m∣(a−c)∴a≡c(modm)
同加性
若 a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) ,则 a+c≡b+c(mod m)a + c \equiv b + c (mod \; m)a+c≡b+c(modm) ;
证明如下,
∵a≡b(mod m)∴m∣(a−b)∴m∣(a−b)+c−c∴m∣(a+c)−(b+c)∴a+c≡b+c(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore m \mid (a - b) \\ & \therefore m \mid (a - b) + c - c \\ & \therefore m \mid (a + c) - (b + c) \\ & \therefore a + c \equiv b + c (mod \; m) \end{aligned} ∵a≡b(modm)∴m∣(a−b)∴m∣(a−b)+c−c∴m∣(a+c)−(b+c)∴a+c≡b+c(modm)
同减性
若 a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) ,则 a−c≡b−c(mod m)a - c \equiv b - c (mod \; m)a−c≡b−c(modm) ;
证明如下,
∵a≡b(mod m)∴m∣(a−b)∴m∣(a−b)−c+c∴m∣(a−c)−(b−c)∴a−c≡b−c(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore m \mid (a - b) \\ & \therefore m \mid (a - b) - c + c \\ & \therefore m \mid (a - c) - (b - c) \\ & \therefore a - c \equiv b - c (mod \; m) \end{aligned} ∵a≡b(modm)∴m∣(a−b)∴m∣(a−b)−c+c∴m∣(a−c)−(b−c)∴a−c≡b−c(modm)
同乘性
若 a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) ,则 ac≡bc(mod m)ac \equiv bc (mod \; m)ac≡bc(modm) ;
证明如下,
∵a≡b(mod m)∴m∣(a−b)∴m∣c(a−b)∴m∣ca−cb∴ac≡bc(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore m \mid (a - b) \\ & \therefore m \mid c(a - b) \\ & \therefore m \mid ca - cb \\ & \therefore ac \equiv bc (mod \; m) \end{aligned} ∵a≡b(modm)∴m∣(a−b)∴m∣c(a−b)∴m∣ca−cb∴ac≡bc(modm)
同除性
若 a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) 且 c∣a,c∣b,(c,m)=1c \mid a, c \mid b, (c, m) = 1c∣a,c∣b,(c,m)=1 ,则 ac≡bc(mod m)\frac ac \equiv \frac bc (mod \; m)ca≡cb(modm) ;
∵a≡b(mod m)∴m∣(a−b)又∵(c,m)=1∴m∣(a−b)c∴m∣ac−bc∴ac≡bc(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore m \mid (a - b) \\ & 又\because (c, m) = 1 \\ & \therefore m \mid \frac{(a - b)}{c} \\ & \therefore m \mid \frac ac - \frac bc \\ & \therefore \frac ac \equiv \frac bc (mod \; m) \end{aligned} ∵a≡b(modm)∴m∣(a−b)又∵(c,m)=1∴m∣c(a−b)∴m∣ca−cb∴ca≡cb(modm)
同幂性
若 a≡b(mod m)a \equiv b (mod \; m)a≡b(modm) ,则 an≡bn(mod m)a^n \equiv b^n (mod \; m)an≡bn(modm) ;
证明如下,
∵a≡b(mod m)∴a mod m=b mod m∴(a mod m)n=(b mod m)n∴(a mod m)n−(b mod m)n=0∴an≡bn(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore a \; mod \; m = b \; mod \; m \\ & \therefore (a \; mod \; m)^n = (b \; mod \; m)^n \\ & \therefore (a \; mod \; m)^n - (b \; mod \; m)^n = 0 \\ & \therefore a^n \equiv b^n (mod \; m) \end{aligned} ∵a≡b(modm)∴amodm=bmodm∴(amodm)n=(bmodm)n∴(amodm)n−(bmodm)n=0∴an≡bn(modm)
推论1
若 a≡b(mod m),c≡d(mod m)a \equiv b (mod \; m), c \equiv d (mod \; m)a≡b(modm),c≡d(modm) ,则 a+b≡c+d(mod m)a + b \equiv c + d (mod \; m)a+b≡c+d(modm) ;
证明如下,
∵a≡b(mod m)∴m∣(a−b)∵c≡d(mod m)∴m∣(c−d)∴m∣(a−b+c−d)∴a+b≡c+d(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore m \mid (a - b) \\ & \because c \equiv d (mod \; m) \\ & \therefore m \mid (c - d) \\ & \therefore m \mid (a - b + c - d) \\ & \therefore a + b \equiv c + d (mod \; m) \end{aligned} ∵a≡b(modm)∴m∣(a−b)∵c≡d(modm)∴m∣(c−d)∴m∣(a−b+c−d)∴a+b≡c+d(modm)
推论2
若 a≡b(mod m),c≡d(mod m)a \equiv b (mod \; m), c \equiv d (mod \; m)a≡b(modm),c≡d(modm) ,则 ab≡cd(mod m)ab \equiv cd (mod \; m)ab≡cd(modm) ;
证明如下,
∵a≡b(mod m)∴m∣c(a−b)∵c≡d(mod m)∴m∣a(c−d)∴m∣(ac−bc+bc−cd)∴ab≡cd(mod m) \begin{aligned} & \because a \equiv b (mod \; m) \\ & \therefore m \mid c(a - b) \\ & \because c \equiv d (mod \; m) \\ & \therefore m \mid a(c - d) \\ & \therefore m \mid (ac - bc + bc - cd) \\ & \therefore ab \equiv cd (mod \; m) \end{aligned} ∵a≡b(modm)∴m∣c(a−b)∵c≡d(modm)∴m∣a(c−d)∴m∣(ac−bc+bc−cd)∴ab≡cd(modm)
推论3
若 a mod p=x,a mod q=x,(p,q)=1a \; mod \; p = x, a \; mod \; q = x, (p, q) = 1amodp=x,amodq=x,(p,q)=1 ,则 a mod (pq)=xa \; mod \; (pq) = xamod(pq)=x ;
证明如下,
∵a mod p=x 则令 sp=a−x a mod q=x 则令 tq=a−x∴sp=tq∵(p,q)=1∴s=nq∴a=npq+x∴a mod (pq)=x \begin{aligned} & \because a \; mod \; p = x \; 则令 \; sp = a - x \\ & \quad \; a \; mod \; q = x \; 则令 \; tq = a - x \\ & \therefore sp = tq \\ & \because (p, q) = 1 \\ & \therefore s = nq \\ & \therefore a = npq + x \\ & \therefore a \; mod \; (pq) = x \end{aligned} ∵amodp=x则令sp=a−xamodq=x则令tq=a−x∴sp=tq∵(p,q)=1∴s=nq∴a=npq+x∴amod(pq)=x