Download presentation

Presentation is loading. Please wait.

Published byShon Riley Modified about 1 year ago

1
PrasadPrimes1 VEDIC MATHEMATICS : Primes T. K. Prasad http://www.cs.wright.edu/~tkprasad

2
PrasadPrimes2 Divisibility A number n is divisible by f if there exists another number q such that n = f * q. –f is called the factor and q is called the quotient. 25 is divisible by 5 6 is divisible by 1, 2, and 3. 28 is divisible by 1, 2, 4, 7, 14, and 28. 729 is divisible by 3, 9, and 243.

3
PrasadPrimes3 Prime Numbers and Composite Numbers A prime number is a number that has exactly two factors: 1 and itself. –Smallest prime number is 2. 1 is not a prime number. –Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, etc. A composite number is a number that has a factor other than 1 and itself. 1 is not a composite number.

4
First 100 primes 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 373 379 383 389 397 401 409 419 421 431 433 439 443 449 457 461 463 467 479 487 491 499 503 509 521 523 541 …

5
Eratosthenes and the Primes Eratosthenes of Cyrene (276 B.C. - 194 B.C., Greece) was a Greek mathematician, poet, athlete, geographer and astronomer. Eratosthenes was the librarian at Alexandria, Egypt. He made several discoveries and inventions including a system of latitude and longitude. He was the first person to calculate the circumference of the Earth, and the tilt of the earth's axis. Eratosthenes devised a 'sieve' to discover prime numbers.

6
Sieve PrasadPrimes6

7
The Sieve of Eratosthenes Algorithm to enumerate primes ≤ n : 1.Generate the sequence 2 to n 2.Print the smallest number in the remaining sequence, which is the new prime p. 3.Remove all the multiples of p. 4.Repeat 3 and 4 until the sequence is exhausted.

8
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 Hundreds Chart

9
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 1 – Cross out 1; it is not prime.

10
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 2 – Leave 2; cross out multiples of 2

11
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 3– Leave 3; cross out multiples of 3

12
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 4– Leave 5; cross out multiples of 5

13
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 5– Leave 7; cross out multiples of 7

14
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 6–Leave 11; cross out multiples of 11

15
12345678910 11121314151617181920 21222324252627282930 31323334353637383940 41424344454647484950 51525354555657585960 61626364656667686970 71727374757677787980 81828384858687888990 919293949596979899 100 All the numbers left are prime

16
The Prime Numbers from 1 to 100 are as follows: 2,3,5,7,11,13,17,19, 23,29,31,37,41,43,47, 53,59,61,67,71,73, 79,83,89,97

17
PrasadPrimes17 Perfect Number A perfect number is a number which is equal to the sum of its (proper) factors. Examples: 6, 28, 496, 8128, etc 1 + 2 + 3 = 6 1 + 2 + 4 + 7 + 14 = 28 These were the only perfect numbers known to early Greek mathematicians (~500 BC).

18
PrasadPrimes18 Amicable Numbers Amicable numbers are pairs of numbers such that the sum of the proper factors of one is equal to the other. Example: (220, 284) –Proper factors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110, which sum to 284; and –Proper factors of 284 are 1, 2, 4, 71, and 142, which sum to 220. Amicable and perfect numbers were known to the Pythagoreans (~500 BC).

19
PrasadPrimes19 Prime Decomposition Every natural number greater than one has a unique prime factorization. That is, it can be uniquely expressed as a product of prime numbers. E.g., 120 = 2 × 2 × 2 × 3 × 5 981189 = 3 × 3 × 11 × 11 × 17 × 53 3141879 = 3 × 13 × 13 × 6197

20
Proof that Primes are infinite : : Proof by Euclid (300 B.C. ) Let us assume that the set of primes is finite. Primes = {2, 3, …, p} Consider the number n = (2 * 3 * … * p) + 1. Claim : n is a prime but is not in Primes. Reason: Each prime divides the first summand but not 1, so it will not divide n. Hence, n is a new prime not in Primes! Conclusion: Primes are not finite. PrasadPrimes20

21
PrasadPrimes21 Advanced Material FYI

22
PrasadPrimes22 Perfect Numbers Euclid (~300 BC) discovered a general formula for even perfect numbers. 2 (n - 1) (2 n - 1) is a perfect number whenever (2 n - 1) is a (Mersenne) prime. Verify that for n = 2, 3, 5, and 7, you get 6, 28, 496, and 8128, respectively. Fifth perfect number is 33550336, for n = 13. (2 11 - 1) is not a prime because 2047 = 23 * 89.

23
PrasadPrimes23 Demonstrating perfection! Prove: 2 (n - 1) (2 n - 1) is a perfect number, whenever (2 n - 1) is a prime. Proof: Sum of factors = [2 (n - 1) + 2 (n - 2) + … + 2 + 1] + (2 n - 1) [2 (n - 2) + … + 2 + 1] = [2 n - 1] + (2 n - 1) [2 (n - 1) - 1] (see next slide)

24
PrasadPrimes24 Auxiliary Result Show [2 (n - 1) + 2 (n - 2) + … + 2 + 1] = [2 n - 1] Let S = [2 (n - 1) + 2 (n - 2) + … + 2 + 1] 2 * S = [2 n + 2 (n - 1) + … + 2*2 + 2] 2 * S - S = 2 n – 1 S = 2 n - 1

25
PrasadPrimes25 (cont’d) Proof: Sum of factors = [2 n - 1] + (2 n - 1) [2 (n - 1) - 1] = (2 n - 1) [1 + 2 (n - 1) - 1] = (2 n - 1) 2 (n - 1) (original number)

26
PrasadPrimes26 Open problems in Number Theory Goldbach's conjecture: Every even integer greater than 2 can be written as the sum of two primes. Odd perfect numbers: It is unknown whether there are any odd perfect numbers. ObserveObserve: Factoring large primes is a very hard problem so a number of cryptographic systems are based on that fact.

27
Primes Generation in Scheme (define (interval-list m n) (if (> m n) '() (cons m (interval-list (+ 1 m) n)))) (define (primes<= n) (sieve (interval-list 2 n))) (primes<= 300)

28
(cont’d) (define (sieve l) (define (remove-multiples n l) (if (null? l)'() (if (= (modulo (car l) n) 0) ; division test (remove-multiples n (cdr l)) (cons (car l) (remove-multiples n (cdr l)))))) (if (null? l) '() (cons (car l) (sieve (remove-multiples (car l) (cdr l))))))

29
Perfection in Python def perfectNumber(n): (factorList, factorSum) = ([],0) for i in range(1, 1 + (n / 2)): #help(math) if ( (n % i) == 0 ): factorList.append(i) factorSum += i if n == factorSum: return (n, factorList) else: return False PrasadPrimes29

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google