07.01.2013 Views

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.6 Chebychev’s Theorem on the Density of Prime Numbers 47<br />

� �<br />

2n<br />

= p<br />

n<br />

k1<br />

1 ···pkr r .<br />

The c<strong>ru</strong>cial observation we will make is that for no ps can the factor pks s <strong>in</strong> this<br />

product be larger than 2n. To get the big number � � 2n<br />

n as a product of such<br />

small contributions requires that the prime decomposition of � � 2n<br />

n conta<strong>in</strong>s<br />

many different primes — namely, Ω(2n/ log(2n)) many — all of them ≤ 2n,<br />

of course. To extend the estimate to odd numbers 2n + 1 is only a technical<br />

matter.<br />

Next, we will fill <strong>in</strong> the details of this sketch.<br />

�<br />

.Wehave<br />

First, we orient ourselves about the order of magnitude of � 2n<br />

n<br />

2 2n<br />

2n ≤<br />

� �<br />

2n<br />

< 2<br />

n<br />

2n , for all n ≥ 1. (3.6.11)<br />

Roughly, this is because � � � 2n 2n<br />

0≤i≤2n i = 2 by the b<strong>in</strong>omial theorem,<br />

and because � � 2n<br />

n is the largest term <strong>in</strong> the sum. (For the details, see<br />

Lemma A.1.2(c) <strong>in</strong> Appendix A.1.)<br />

Foranumbermand a prime p we denote the exact power to which p<br />

appears <strong>in</strong> the prime factorization of m by νp(m). Thus νp(m) isthelargest<br />

k ≥ 0sothatpk | m, and<br />

m = �<br />

p νp(m) ,<br />

p | m<br />

where the product extends over all prime factors of m.<br />

For example, ν3(18) = ν3(2·3 2 )=2,ν2(10 k )=ν5(10 k )=k. Interest<strong>in</strong>gly,<br />

it is almost trivial to calculate to which power a prime divides the number<br />

n!. This is most easily expressed us<strong>in</strong>g the “floor function” (def<strong>in</strong>ed <strong>in</strong> Ap-<br />

pendix A.2). To give some <strong>in</strong>tuitive sense to the follow<strong>in</strong>g formula, note that<br />

for <strong>in</strong>tegers a ≥ 0andb≥1thenumber⌊a b ⌋ = a div b equals the number of<br />

multiples b, 2b, 3b,... of b that do not exceed a.<br />

Lemma 3.6.4 (Legendre). For all n ≥ 1 and all primes p we have<br />

νp(n!) = �<br />

�<br />

n<br />

pk �<br />

.<br />

k≥1<br />

Proof. The proof is a typical example for a simple, but very helpful count<strong>in</strong>g<br />

technique used a lot <strong>in</strong> comb<strong>in</strong>atorics as well as <strong>in</strong> the amortized analysis of<br />

algorithms. Consider the set<br />

Rp,n = {(i, k) | 1 ≤ i ≤ n and p k divides i }.<br />

Table 3.6 depicts an example for this set (p =2andn = 20) as a matrix with<br />

log p (n) rowsandn columns, and entries 1 (•) and 0 (empty). We obta<strong>in</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!