1.整除(|)
1.定义
如果b=a*q1+c(a,b,q1
∈
\in
∈
Z
\mathbb{Z}
Z)且c=0,则b整除a,计做a|b
2.性质
(1)如果a|b,b|c,则a|c
(2)a|b且a|c,等价于a|(bx+cy) (x,y
∈
\in
∈
Z
\mathbb{Z}
Z)
(3)设m
≠
0
\neq0
=0,则a|b等价于am|bm
(4)设x
∈
\in
∈
Z
\mathbb{Z}
Z,y
∈
\in
∈
Z
\mathbb{Z}
Z满足ax+by=1,且a|n,b|n,那么(ab)|n
证明:
令a
∗
*
∗s=n,b
∗
*
∗t=n (s,t
∈
\in
∈
Z
\mathbb{Z}
Z)
∵
\because
∵ax+by=1
∴
\therefore
∴
x
b
\frac{x}{b}
bx+
y
a
\frac{y}{a}
ay=
1
a
b
\frac{1}{ab}
ab1
又
∵
\because
∵(ab)|n
∈
\in
∈
Z
\mathbb{Z}
Z等价
n
a
b
\frac{n}{ab}
abn
∈
\in
∈
Z
\mathbb{Z}
Z=n
∗
*
∗
1
a
b
\frac{1}{ab}
ab1
∈
\in
∈
Z
\mathbb{Z}
Z
∴
\therefore
∴
1
a
b
\frac{1}{ab}
ab1
∗
*
∗n=
x
n
b
\frac{xn}{b}
bxn+
y
n
a
\frac{yn}{a}
ayn=
b
t
x
b
\frac{btx}{b}
bbtx+
a
s
y
a
\frac{asy}{a}
aasy=tx+sy’=
又
∵
\because
∵ t,x,y,s
∈
\in
∈
Z
\mathbb{Z}
Z
∴
\therefore
∴得证
(5)若b=q*d+c,那么d|b的充要条件是d|c
2.模(mod)
1.定义
如果b=a*q1+c(a,b,q1
∈
\in
∈
Z
\mathbb{Z}
Z)且c
≠
0
\neq0
=0,c=b mod a也计做b%a
2.性质
(1)如果a%b=c,d
≠
0
\neq0
=0,则有(a
∗
*
∗d)%(b
∗
*
∗d)=c
∗
*
∗d(分配律)
证明:
令a=b
∗
*
∗s+c
∴
\therefore
∴a
∗
*
∗d=b
∗
*
∗s
∗
*
∗d+c
∗
*
∗d
=(b
∗
*
∗d)
∗
*
∗s+c
∗
*
∗d
b
∗
*
∗d
→
\rightarrow
→除数
c
∗
*
∗s
→
\rightarrow
→余数
∴
\therefore
∴得证
(2)如果a%b=c,d|a,d|b,则
a
d
\frac{a}{d}
da mod
b
d
\frac{b}{d}
db=
c
d
\frac{c}{d}
dc
证明:
设a=b
∗
*
∗s+c
∴
\therefore
∴
b
d
\frac{b}{d}
db
∗
*
∗s+
c
d
\frac{c}{d}
dc=
a
d
\frac{a}{d}
da
又
∵
\because
∵d|a,d|b
∴
\therefore
∴
b
d
\frac{b}{d}
db,
a
d
\frac{a}{d}
da
∈
\in
∈
Z
\mathbb{Z}
Z
∴
\therefore
∴
c
d
\frac{c}{d}
dc
∈
\in
∈
Z
\mathbb{Z}
Z
∴
\therefore
∴得证
(3) a b \frac{a}{b} ba% c c c= a m o d ( b ∗ c ) b \frac{a mod (b*c)}{b} bamod(b∗c)
3.同余
1.定义
设m
∈
\in
∈
Z
\mathbb{Z}
Z,若满足m|(a-b),则称a与b对模m同余
记为a
≡
\equiv
≡b(mod m)或a
≡
\equiv
≡b(m)
证明:
设
q
1
q_1
q1,
q
2
q_2
q2
∈
\in
∈
Z
\mathbb{Z}
Z
则a=m*
q
1
q_1
q1+r
b=m*
q
2
q_2
q2+r
∴
\therefore
∴a-b=m*(
q
1
q_1
q1-
q
2
q_2
q2)
∴
\therefore
∴m|(a-b)
∴
\therefore
∴得证
逆:
∵
\because
∵a-b=(
q
1
q_1
q1-
q
2
q_2
q2)*m
∴
\therefore
∴a-
q
1
q_1
q1*m=b-
q
2
q_2
q2*m
∴
\therefore
∴a=
q
1
q_1
q1+r
∴
\therefore
∴b=
q
2
q_2
q2+r
其中:
q
1
q_1
q1*m
→
\rightarrow
→商
a-
q
1
q_1
q1
→
\rightarrow
→余数
2.性质
(1)自反性
a
≡
\equiv
≡a(mod m)
(2)对称性
if a
≡
\equiv
≡b(mod m) b
≡
\equiv
≡a(mod m)
(3)传递性
if a
≡
\equiv
≡b(mod m),b
≡
\equiv
≡c(mod m)
then a
≡
\equiv
≡c(mod m)
证明:
m|a-b m|b-c
m|(a+c)-(b+c)
=m|a-b
(4)同加性
若a
≡
\equiv
≡b(mod p),则a+c
≡
\equiv
≡b+c(mod p)
(5)同减性
若a
≡
\equiv
≡b(mod p),则a-c
≡
\equiv
≡b-c(mod p)
(6)同乘性
若a
≡
\equiv
≡b(mod p),则a
∗
*
∗c
≡
\equiv
≡b
∗
*
∗c(mod p)
(7)同除性
若a
≡
\equiv
≡b(mod p),且c|a,c|b,(c,p)=1,则
a
c
\frac{a}{c}
ca
≡
\equiv
≡
b
c
\frac{b}{c}
cb(mod p)
证明:
设a=m
∗
*
∗
q
1
q_1
q1+r
b=m
∗
*
∗
q
2
q_2
q2+r
则
a
c
\frac{a}{c}
ca=
m
q
1
c
\frac{mq_1}{c}
cmq1+r,
b
c
\frac{b}{c}
cb=
m
q
2
c
\frac{mq_2}{c}
cmq2+r
a
c
\frac{a}{c}
ca-
b
c
\frac{b}{c}
cb=
m
q
1
c
\frac{mq_1}{c}
cmq1-
m
q
2
c
\frac{mq_2}{c}
cmq2=m
∗
*
∗
q
1
−
q
2
c
\frac{q_1-q_2}{c}
cq1−q2
又
∵
\because
∵(m,c)=1
∴
\therefore
∴m|m
∗
*
∗
q
1
−
1
2
c
\frac{q_1-1_2}{c}
cq1−12
∴
\therefore
∴得证
(8)同幂性
若a
≡
\equiv
≡b(mod p),c>0,则
a
c
a^c
ac
≡
\equiv
≡
b
c
b^c
bc(mod p)
证明:
a
c
a^c
ac-
b
c
b^c
bc=(a-b)(
a
c
−
1
a^{c-1}
ac−1+
a
c
−
2
a^{c-2}
ac−2b+…a
b
c
−
2
b^{c-2}
bc−2+
b
c
−
1
b^{c-1}
bc−1)
又
∵
\because
∵m|a-b
∴
\therefore
∴m|
a
c
a^c
ac-
b
c
b^c
bc
(9)若a%p=x,a%q=x,且p,q互质,则a%(p
∗
*
∗q)=x
证明:
∵
\because
∵a%p=a%q=x
∴
\therefore
∴a-x=
k
1
k_1
k1*p=
k
2
k_2
k2*q
即a-x即是p,q的公倍数
又
∵
\because
∵(p,q)=1
∴
\therefore
∴[p,q]=p
∗
*
∗q
∴
\therefore
∴
∃
\exist
∃[p,q]
→
\rightarrow
→
k
3
k_3
k3使a-x=
k
3
k_3
k3
∴
\therefore
∴得证