10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.3 Recognizing smooth numbers 129<br />

our list and 9699690 mod x = r. Thenr = ab, wherea = gcd(9699690,x)and<br />

gcd(b, x) = 1. If the highest exponent on any prime in the prime factorization<br />

of x is bounded above by 2e ,thengcd(r2emod x, x) is the 20-smooth part<br />

of x. So in our case, we can take e =4,since224> 1008. Let us see what<br />

happens for the number x = 1008. First, we have r = 714. Next we take<br />

7142i mod 1008 for i =1, 2, 3, 4, getting 756, 0, 0, 0. Of course, we ought to<br />

be smart enough to stop when we get the first 0, since this already implies<br />

that 1008 is 20-smooth. If we apply this idea to x = 1004, we get r = 46, and<br />

the requisite powers are 108, 620, 872, 356. We take gcd(356, 1004) and find<br />

it to be 4. Surely this must be the long way around! But as we shall see, the<br />

method scales beautifully. Further, we shall see that it is not interesting to<br />

focus on any one number, but on all numbers together.<br />

We form the product 9699690 of the primes up to 20 via a “product tree;”<br />

see [Bernstein 2004e]. This is just the binary tree as so:<br />

<br />

✟<br />

✟❍9699690<br />

✟<br />

❍❍❍❍❍46189<br />

✟<br />

✟<br />

✟<br />

210<br />

❅<br />

❅<br />

❅<br />

❅<br />

6<br />

❅<br />

2 ❅3<br />

❅35 ❅<br />

5 ❅7<br />

143<br />

❅<br />

11 ❅13<br />

❅323 ❅<br />

17 ❅19<br />

Product tree for P = {2, 3, 5, 7, 11, 13, 17, 19}<br />

We start at the leaves, multiplying ourselves through the binary tree to the<br />

root, whose label is the product P = 9699690 of all of the leaves.<br />

We wish to find each residue P mod x as x varies over the numbers we are<br />

examining for smoothness. If we do this separately for each x, sinceP is so<br />

large, the process will take too long. Instead, we first multiply all the numbers<br />

x together! We do this as with the primes, with a product tree. However, we<br />

never need to form a product that is larger than P ; say we simply indicate such<br />

large products with an asterisk. Let us consider the product tree T formed<br />

from the numbers 1001, 1002,...,1008:<br />

<br />

✟<br />

✟❍∗<br />

❍❍❍❍❍<br />

✟<br />

✟<br />

✟<br />

✟<br />

∗<br />

∗<br />

❅<br />

❅<br />

❅<br />

❅<br />

1003002<br />

❅<br />

1001 ❅1002<br />

❅1007012 ❅<br />

1003❅1004 1011030 ❅1015056 <br />

❅<br />

❅<br />

1005 ❅1006 1007❅1008 Product tree T for X = {1001, 1002,...,1008}

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

Saved successfully!

Ooh no, something went wrong!