Monday, 21 December 2015

Prime Numbers


Prime Number: A natural number Greater than UNITY(1) is a prime if it doesn’t have other divisor / factor except for itself and UNITY.
Note: Unity (i.e. 1 ) is not prime number.
Properties of prime numbers: 
  1. Lowest prime number is 2.
  2. 2 is also the one & only even prime number.
  3. The lowest odd prime number is 3.
  4. The reminder of the division of the square of a prime number ‘p’
    (p > 3) divided by 12 or 24 is “ONE(1)”.
    • eg 1: p = 13
      • 2 = 169 (169 > 3)
      • 169 / 12 , 169 / 24 both will give remainder ‘1’.
Short cut to check a number is prime or not:
    1. Take the square root of the given number(N).
    2. Round of the square root to the immediate lower integer. (assume it is z)
    3. Check for divisibility of the number N by all prime numbers below z.
      If there is no prime number below z which divides N then the number N will be prime.
    4. example: 113
      Square root of 239:  √113  lies between 10 and 11. Hence take z as 10.
      primes below 15 are 2,3,5 & 7. 113 is not divisible by any of these.
      So we can conclude that 113 is a prime number.

No comments:

Post a Comment