Presentation is loading. Please wait.

Presentation is loading. Please wait.

PrasadPrimes1 VEDIC MATHEMATICS : Primes T. K. Prasad

Similar presentations


Presentation on theme: "PrasadPrimes1 VEDIC MATHEMATICS : Primes T. K. Prasad"— Presentation transcript:

1 PrasadPrimes1 VEDIC MATHEMATICS : Primes T. K. Prasad

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 is divisible by 1, 2, 4, 7, 14, and 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 …

5 Eratosthenes and the Primes Eratosthenes of Cyrene (276 B.C 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 Hundreds Chart

9 – Cross out 1; it is not prime.

10 – Leave 2; cross out multiples of 2

11 – Leave 3; cross out multiples of 3

12 – Leave 5; cross out multiples of 5

13 – Leave 7; cross out multiples of 7

14 –Leave 11; cross out multiples of 11

15 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 = = 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 × = 3 × 3 × 11 × 11 × 17 × = 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 , for n = 13. ( ) 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 n - 1) [2 (n - 2) + … ] = [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 n - 1] Let S = [2 (n - 1) + 2 (n - 2) + … ] 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


Download ppt "PrasadPrimes1 VEDIC MATHEMATICS : Primes T. K. Prasad"

Similar presentations


Ads by Google