Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru
Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru
Dietzfelbinger M. Primality testing in polynomial time ... - tiera.ru
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
44 3. Fundamentals from Number Theory<br />
Proof. Choose prime decompositions p1 ···pr of n and q1 ···qs of m. Then<br />
p1 ···pr · q1 ···qs is a prime decomposition of n · m. By Lemma 3.5.7 and the<br />
fundamental theorem (Theorem 3.5.8) p appears among p1,...,pr,q1,...,qr.<br />
If p is one of the pi, thenp divides n, otherwise it is among the qj’s and hence<br />
divides m. ⊓⊔<br />
Corollary 3.5.10. If p1,...,pr are dist<strong>in</strong>ct prime numbers that all divide n,<br />
then p1 ···pr divides n.<br />
Proof. Let n = q1 ···qs be the prime decomposition of n. Foreachpi we<br />
have the follow<strong>in</strong>g: By Lemma 3.5.7 and Theorem 3.5.8, pi must occur among<br />
q1,...,qs. Nowthepi are dist<strong>in</strong>ct, so by reorder<strong>in</strong>g we may assume pi = qi,<br />
for 1 ≤ i ≤ r. Thenn =(p1 ···pr) · (qr+1 ···qs), which proves the claim. ⊓⊔<br />
We close this section with a remark on the connection between the concept<br />
of numbers be<strong>in</strong>g relatively prime and their prime factorization and draw a<br />
consequence for the problem of calculat<strong>in</strong>g ϕ(n).<br />
Proposition 3.5.11. Let n, m ≥ 1 have prime decompositions n = p1 ···pr<br />
and m = q1 ···qs. Thena, b are relatively prime if and only if {p1,...,pr}∩<br />
{q1,...,qs} = ∅.<br />
Proof. “⇒”: Indirectly. Suppose a prime number p occurred <strong>in</strong> both prime<br />
decompositions. Then p would divide both n and m, hence gcd(n, m) would<br />
be larger than 1. — “⇐”: Indirectly. Suppose gcd(n, m) > 1. Then there is a<br />
prime number p that divides gcd(n, m) and hence divides both n and m. By<br />
Theorem 3.5.8 p occurs <strong>in</strong> {p1,...,pr} and <strong>in</strong> {q1,...,qs}. ⊓⊔<br />
Corollary 3.4.5 stated that ϕ(n1 · n2) =ϕ(n1) · ϕ(n2) ifn1 and n2 are<br />
relatively prime. This makes it possible to calculate ϕ(n) forn easily once<br />
the prime decomposition of n is known.<br />
Proposition 3.5.12. If n ≥ 1 has the prime decomposition n = p k1<br />
1 ···pkr r<br />
for dist<strong>in</strong>ct prime numbers p1,...,pr, then<br />
ϕ(n) = �<br />
(pi − 1)p ki−1<br />
= n · �<br />
�<br />
1 − 1<br />
�<br />
.<br />
1≤i≤r<br />
i<br />
1≤i≤r<br />
Proof. The formulas are trivially correct for n = 1. Thus, assume n ≥ 2.<br />
Case 1: n is a prime number. — Then ϕ(n) =|{1,...,n− 1}| = n − 1, and<br />
the formulas are correct.<br />
Case 2: n = p k for a prime number p and some k ≥ 2. — Then<br />
ϕ(n) =|{a | 1 ≤ a