授课老师:陈恭亮
文章目录
整除因数
(1.1)0是任何非零整数的倍数,1是任何整数的因数,任何非零整数a是其自身的倍数,也是其自身的因数。
(1.2)2、3、5分别整除30,30被2、3、5分别整除,记作 2|30、3|30、5|30.
素数与厄拉脱塞师筛法
(2.1)一个合数的最小正因数p一定是素数,且p≤√n
(2.2)寻找素数的确定性方法:厄拉脱塞师(Eratosthenes)筛法
列出N个整数及≤√N的所有素数,从N中删除所有素数的倍数,余下的就是所有不超过N的素数
N=20;≤4的素数:2、3;删除2 4 6 8 10 12 14 16 18 20、3 6 9 12 15 18
- 1 2 3
4567891011121314151617181920 - 1 2 3
4567891011121314151617181920 - 1 2 3 5 7 11 13 17 19
欧几里得除法与素数的评分判别
(3.1)欧几里得除法(Euclid)/带余数除法:
a
=
q
⋅
b
+
r
a = q·b + r
a=q⋅b+r ; q与r 有唯一存在性
q叫做a被b除所得的不完全商,r叫做a被b除所得的余数;b|a(整除)=== r=0
q·b ≤ a < (q+1) b;
0 ≤ a-q·b < b;
0 ≤ r < b
(3.2)[x]:x的整数部分,小于等于x的最大整数。即 [x] ≤ x < [x]+1
(3.3)素数判别:是否能被≤√N的所有素数整除
最大公因数与广义欧几里得除法
(4.1)最大公因数:(14,21)= 7,(0,a)= |a|
(4.2)广义欧几里得除法:不全为0的整数a b c,若
a
=
q
⋅
b
+
c
a =q·b + c
a=q⋅b+c,则
(
a
,
b
)
=
(
b
,
c
)
(a,b)=(b,c)
(a,b)=(b,c),即将求解较大的两个数a,b的公因数转化为求较小的两个整数b,c的公因数
例如,求(-1859,1573)
1859 = 1 · 1573 + 286
1573 = 5 · 286 + 143
(-1859,1573)=(1573,286)=(286,143)= 143
贝祖(Bezout)等式
(5.1)Bezout等式:
s
⋅
a
+
t
⋅
b
=
(
a
,
b
)
s·a + t·b = (a,b)
s⋅a+t⋅b=(a,b)
例如,(a,b)= (-1859,1573)= 143,求 s·a + t·b = (a,b)
143 = 1573 + (-5)·286
143 = 1573 + (-5)·(1859+(-1)1573)
. . . .= 1573·6 + 5·(-1859)
∴s = 5,t = 6满足s·a + t·b = (a,b)
最大公因数进一步的性质
(6.1)求多个整数的最大公因数,可以用递归的方法
(
a
1
,
a
2
)
=
d
1
,
(
d
1
,
a
3
)
=
d
2
,
(
d
2
,
a
4
)
=
d
3
⋅
⋅
⋅
⋅
⋅
⋅
(a_1,a_2)=d_1 , (d_1,a_3)=d_2 , (d_2,a_4)=d_3 ······
(a1,a2)=d1,(d1,a3)=d2,(d2,a4)=d3⋅⋅⋅⋅⋅⋅
整数的进一步性质及最小公倍数
(7.1) 每个证整数都可以表示为素数的乘积,且表达式是惟一的,又叫标准分解式,
n
=
p
1
a
⋅
⋅
⋅
p
n
b
,
a
,
b
≥
0
n = p_1^a···p_n^b,a,b≥ 0
n=p1a⋅⋅⋅pnb,a,b≥0
如45=32·5,100=22·52,1024=210
(7.2)当αi > 0,n的因数个数为
d
(
n
)
=
(
1
+
α
1
)
⋅
⋅
⋅
(
1
+
α
s
)
d(n) = (1+α_1)···(1+α_s)
d(n)=(1+α1)⋅⋅⋅(1+αs)
(7.3)最大公因数(a,b),最小公倍数[a,b],有
(
a
,
b
)
[
a
,
b
]
=
a
⋅
b
(a,b)[a,b]=a·b
(a,b)[a,b]=a⋅b
(7.4)求多个整数的最大公因数和最小公倍数:
例1:求120,150,210,35的最大公因数和最小公倍数
120=23·3·5,150=2·3·52,210=2·3·5·7,35=5·7
(120,150,210,35) = 2min(3,1,1,0)·3min(1,1,1,0)·5min(1,2,1,1)·7min(0,0,1,1) = 5
[120,150,210,35] = 2max(3,1,1,0)·3max(1,1,1,0)·5max(1,2,1,1)·7max(0,0,1,1) = 4200
(7.5)
[
a
,
b
]
=
a
′
⋅
b
′
,
(
a
′
,
b
′
)
=
1
[a,b]=a'·b' , (a',b')=1
[a,b]=a′⋅b′,(a′,b′)=1
例2:a = 79720245000 = 23·32·54·70·116,b = 9318751596 = 22·36·50·74·113
[a,b] = 23·36·54·74·116 = a’·b’
a’ = 23·54·116,b’ = 36·74 -------→ (a’,b’)=1
(7.6)设 π(x) 表示小于x的素数个数,pn 是第n个素数。则有
l
n
2
⋅
x
3
a
⋅
l
n
x
<
π
(
x
)
<
x
l
n
x
⋅
6
l
n
2
\frac{{\rm ln}2·x}{3a·{\rm ln}x}<π(x)<\frac{x}{{\rm ln}x}·6{\rm ln}2
3a⋅lnxln2⋅x<π(x)<lnxx⋅6ln2
1
6
l
n
2
⋅
n
l
n
n
<
p
n
<
8
l
n
2
⋅
n
l
n
n
\frac{1}{6{\rm ln}2}·n{\rm ln}n< p_n <\frac{8}{ln2}·n{\rm ln}n
6ln21⋅nlnn<pn<ln28⋅nlnn
(7.7)素数定理:
lim
n
→
∞
π
(
x
)
x
l
n
x
=
1
\lim_{n \to \infty} \frac{π(x)}{\frac{x}{{\rm ln}x}}=1
n→∞limlnxxπ(x)=1
算数基本定理与素数定理与最小公倍数
(8.1)若
p
∣
a
b
,
则
p
∣
a
或
p
∣
b
p|ab,则p|a或p|b
p∣ab,则p∣a或p∣b,扩展:若p是素数,
p
∣
a
1
a
2
⋅
⋅
⋅
a
n
,
p|a_1a_2···a_n,
p∣a1a2⋅⋅⋅an,则 p 一定整除某个 ak
(8.2)若a,b互素,则(1)
若
a
∣
D
,
b
∣
D
,
则
a
⋅
b
∣
D
若a|D,b|D,则a·b|D
若a∣D,b∣D,则a⋅b∣D,(2)
[
a
,
b
]
=
a
⋅
b
[a,b]=a·b
[a,b]=a⋅b
(8.3)
[
a
,
b
]
(
a
,
b
)
=
a
⋅
b
[a,b] (a,b)=a·b
[a,b](a,b)=a⋅b
例如:求120,150,210,35的最小公倍数
[
120
,
150
]
=
120
⋅
150
(
120
,
150
)
=
120
⋅
150
30
=
600
[120,150]=\frac{120·150}{(120,150)}=\frac{120·150}{30}=600
[120,150]=(120,150)120⋅150=30120⋅150=600
[
600
,
210
]
=
600
,
210
(
600
,
210
)
=
4200
[600,210]=\frac{600,210}{(600,210)}=4200
[600,210]=(600,210)600,210=4200
[
4200
,
35
]
=
4200
[4200,35]=4200
[4200,35]=4200