A Prime Primer
-
Upload
morten-christensen -
Category
Documents
-
view
220 -
download
0
description
Transcript of A Prime Primer
![Page 1: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/1.jpg)
Prime Time
December 2008
Morten Jagd Christensen
Thrane & Thrane A/S
![Page 2: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/2.jpg)
is
25288891392479400456592804986000222944998316082937128866378556017873124536111976520731519116376124029996303932610315220549847432414563643
prime?
![Page 3: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/3.jpg)
313-05-2009Skriv titel på præsentation
Agenda
Number theoryProof of infinite number of primesDistribution of primesFermat s little theorem
Algorithms for primality testing
Testing small primes
Using your graphics card for fast calculationsOpenGL graphics accelerationOpenGL Shading Language programmable graphics pipeline
Testing large primesFast multiplications
GNU Multi Precision library
![Page 4: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/4.jpg)
413-05-2009Skriv titel på præsentation
What is a prime number?
A number which is only divisible by it self and 12 is the only even prime numberOdd prime numbers end in 1, 3, 7 or 9
All natural numbers are uniquely described by prime factors
4=22 6=2 2 8=23 ... 2100 = 22 3 52 7 etc.can be found by factoring into primes
Consider the positive integers 1,2,3,4,.....Primes behave like statistical fluctuations taking up as muchroom as possible considering the requirement of a completesequence of integers
![Page 5: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/5.jpg)
513-05-2009Skriv titel på præsentation
How many primes are there?
Euclid (300 BC) proved there are infinitely many primes
Construct the following new number
m= (2 3 5 7 11 13 17... n) + 1
Neither of 2..n divides m
-> There must be at least one prime larger than n thatdivides m
![Page 6: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/6.jpg)
613-05-2009Skriv titel på præsentation
Mother of prime algorithms
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
![Page 7: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/7.jpg)
713-05-2009Skriv titel på præsentation
Mother of prime algorithms
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2223 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
![Page 8: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/8.jpg)
813-05-2009Skriv titel på præsentation
Mother of prime algorithms
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2223 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
![Page 9: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/9.jpg)
913-05-2009Skriv titel på præsentation
Mother of prime algorithms
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2223 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
![Page 10: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/10.jpg)
1013-05-2009Skriv titel på præsentation
Mother of prime algorithms
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2223 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
![Page 11: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/11.jpg)
1113-05-2009Skriv titel på præsentation
Fermat s little theorem
Composite testif a < p
)1( p
![Page 12: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/12.jpg)
1213-05-2009Skriv titel på præsentation
Fermat s little theorem
Composite testif a < p
so (p,a) = (503, 2)2^502 = 1 (mod 503) could be prime
and (p,a) = (501,2)2^501 = 4 (mod 500) is composite
)1( p
![Page 13: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/13.jpg)
By the way25288891392479400456592804986000222944998316082937128866378556017873124536111976520731519116376124029996303932610315220549847432414563643
is prime
![Page 14: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/14.jpg)
1413-05-2009Skriv titel på præsentation
References
D.E. Knuth The art of Computer Programming
Numerical Recipes in C++
GMP Manual
OpenGL Orange Book
![Page 15: A Prime Primer](https://reader031.fdocuments.in/reader031/viewer/2022020309/568c34171a28ab02358f2299/html5/thumbnails/15.jpg)
This document was created with Win2PDF available at http://www.daneprairie.com.The unregistered version of Win2PDF is for evaluation or non-commercial use only.