Prime Numbers
Prime Numbers Prime Numbers
9.7 Exercises 527 0 2 +3 2 +0 2 is given a weight factor of 1/4. By considering an appropriate m-fold convolution of a certain signal with itself, show that R2(n) = 1 −1 p + (pδ0n − 1) , 4 p R3(n) = 1 p 8 2 −n + p , p R4(n) = 1 3 2 p + p δ0n − p 16 . (A typical test case that can be verified by hand is for p = 23: R4(0) = 12673/16, and for any n ≡ 0(modp), R4(n) = 759.) Now, from these exact relations, conclude: (1) Any prime p ≡ 1 (mod 4) is a sum of two squares, while p ≡ 3(mod4) cannot be (cf. Exercise 5.16). (2) There exists 0
528 Chapter 9 FAST ALGORITHMS FOR LARGE-INTEGER ARITHMETIC 9.44. Implement Algorithm 9.5.19, with a view to proving that p =2 521 − 1 is prime via the Lucas–Lehmer test. The idea is to maintain the peculiar, variable-base representation for everything, all through the primality test. (In other words, the output of Algorithm 9.5.19 is ready-made as input for a subsequent call to the algorithm.) For larger primes, such as the gargantuan new Mersenne prime discoveries, investigators have used run lengths such that q/D, the typical bit size of a variable-base digit, is roughly 16 bits or less. Again, this is to suppress as much as possible the floating-point errors. 9.45. Implement Algorithm 9.5.17 to establish the character of various Fermat numbers, using the Pepin test, that Fn is prime if and only if 3 (Fn−1)/2 ≡−1(modFn). Alternatively, the same algorithm can be used in factorization studies [Brent et al. 2000]. (Note: The balanced representation error reduction scheme mentioned in Exercise 9.55 also applies to this algorithm for arithmetic with Fermat numbers.) This method has been employed for the resolution of F22 in 1993 [Crandall et al. 1995] and F24 [Crandall et al. 1999]. 9.46. Implement Algorithm 9.5.20 to perform large-integer multiplication via cyclic convolution of zero-padded signals. Can the DWT methods be applied to do negacyclic integer convolution via an appropriate CRT prime set? 9.47. Show that if the arithmetic field is equipped with a cube root of unity, then for D = 3 · 2 k one can perform a length-D cyclic convolution by recombining three separate length-2 k convolutions. (See Exercise 9.43 and consider the symbolic factorization of t D − 1forsuchD.) This technique has actually been used by G. Woltman in the discovery of new Mersenne primes (he has employed IBDWTs of length 3 · 2 k ). 9.48. Implement the ideas in [Percival 2003], where Algorithm 9.5.19 is generalized for arithmetic modulo Proth numbers k ·2n ±1. The essential idea is that working modulo a number a ± b can be done with good error control, as long as the prime product p|ab p is sufficiently small. In the Percival approach, one generalizes the variable-base representation of Theorem 9.5.18 to involve products over prime powers in the form x = D−1 j=0 xj p k a ⌈kj/D⌉ p q m b q ⌈−mj/D⌉+mj/D , for fast arithmetic modulo a − b. Note that the marriage of such ideas with the fast mod operation of Algorithm 9.2.14 would result in an efficient union for computations that need to move away from the restricted theme of Mersenne/Fermat numbers. Indeed, as evidenced in the generalized Fermat number searches described in [Dubner and Gallot 2002], wedding bells have already sounded.
- Page 486 and 487: 9.5 Large-integer multiplication 47
- Page 488 and 489: 9.5 Large-integer multiplication 47
- Page 490 and 491: 9.5 Large-integer multiplication 48
- Page 492 and 493: 9.5 Large-integer multiplication 48
- Page 494 and 495: 9.5 Large-integer multiplication 48
- Page 496 and 497: 9.5 Large-integer multiplication 48
- Page 498 and 499: 9.5 Large-integer multiplication 48
- Page 500 and 501: 9.5 Large-integer multiplication 49
- Page 502 and 503: 9.5 Large-integer multiplication 49
- Page 504 and 505: 9.5 Large-integer multiplication 49
- Page 506 and 507: 9.5 Large-integer multiplication 49
- Page 508 and 509: 9.5 Large-integer multiplication 49
- Page 510 and 511: 9.5 Large-integer multiplication 50
- Page 512 and 513: 9.5 Large-integer multiplication 50
- Page 514 and 515: 9.5 Large-integer multiplication 50
- Page 516 and 517: 9.5 Large-integer multiplication 50
- Page 518 and 519: 9.6 Polynomial arithmetic 509 can i
- Page 520 and 521: 9.6 Polynomial arithmetic 511 Incid
- Page 522 and 523: 9.6 Polynomial arithmetic 513 where
- Page 524 and 525: 9.6 Polynomial arithmetic 515 such
- Page 526 and 527: 9.6 Polynomial arithmetic 517 Note
- Page 528 and 529: 9.7 Exercises 519 (3) Write out com
- Page 530 and 531: 9.7 Exercises 521 where “do” si
- Page 532 and 533: 9.7 Exercises 523 9.23. How general
- Page 534 and 535: 9.7 Exercises 525 two (and thus, me
- Page 538 and 539: 9.7 Exercises 529 9.49. In the FFT
- Page 540 and 541: 9.7 Exercises 531 adjustment step.
- Page 542 and 543: 9.7 Exercises 533 9.69. Implement A
- Page 544 and 545: 9.8 Research problems 535 less than
- Page 546 and 547: 9.8 Research problems 537 1.66), na
- Page 548 and 549: 9.8 Research problems 539 9.82. A c
- Page 550 and 551: 542 Appendix BOOK PSEUDOCODE Becaus
- Page 552 and 553: 544 Appendix BOOK PSEUDOCODE } ...;
- Page 554 and 555: 546 Appendix BOOK PSEUDOCODE Functi
- Page 556 and 557: 548 REFERENCES [Apostol 1986] T. Ap
- Page 558 and 559: 550 REFERENCES [Bernstein 2004b] D.
- Page 560 and 561: 552 REFERENCES [Buchmann et al. 199
- Page 562 and 563: 554 REFERENCES [Crandall 1997b] R.
- Page 564 and 565: 556 REFERENCES [Dudon 1987] J. Dudo
- Page 566 and 567: 558 REFERENCES [Goldwasser and Kili
- Page 568 and 569: 560 REFERENCES [Joe 1999] S. Joe. A
- Page 570 and 571: 562 REFERENCES [Lenstra 1981] H. Le
- Page 572 and 573: 564 REFERENCES [Montgomery 1987] P.
- Page 574 and 575: 566 REFERENCES [Oesterlé 1985] J.
- Page 576 and 577: 568 REFERENCES [Pomerance et al. 19
- Page 578 and 579: 570 REFERENCES [Schönhage and Stra
- Page 580 and 581: 572 REFERENCES [Sun and Sun 1992] Z
- Page 582 and 583: 574 REFERENCES [Weisstein 2005] E.
- Page 584 and 585: Index ABC conjecture, 417, 434 abel
9.7 Exercises 527<br />
0 2 +3 2 +0 2 is given a weight factor of 1/4. By considering an appropriate<br />
m-fold convolution of a certain signal with itself, show that<br />
R2(n) = 1<br />
<br />
−1<br />
p + (pδ0n − 1) ,<br />
4 p<br />
R3(n) = 1<br />
<br />
p<br />
8<br />
2 <br />
−n<br />
+ p ,<br />
p<br />
R4(n) = 1 3 2<br />
p + p δ0n − p<br />
16<br />
.<br />
(A typical test case that can be verified by hand is for p = 23: R4(0) =<br />
12673/16, and for any n ≡ 0(modp), R4(n) = 759.)<br />
Now, from these exact relations, conclude:<br />
(1) Any prime p ≡ 1 (mod 4) is a sum of two squares, while p ≡ 3(mod4)<br />
cannot be (cf. Exercise 5.16).<br />
(2) There exists 0