Prime Number

DEFINITION:  A number which has exactly two distinct factors is a Prime Number
 If  p is a prime number then the factors of p are 1,p.
Prime Number Factors
2 1,2
3 1,3
5 1,5
7 1,7
11 1,11
13 1,13
17 1,17
19 1,19
23 1,23
29 1,29
31 1,31
37 1,37
41 1,41
43 1,43
47 1,47

• If a number has no factor equal to or less than its square root, then the number is prime
The least prime number is even:2
There are 25 prime numbers from 1 to 100:  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

How to identify whether the given number is a prime.
step1. Find the square root of the given number and take the nearest integer.
step2. write the prime numbers less  than that square root( nearest int)
step3. Verify whether any prime(less that the square root) is a factor the given number or not.
step4. If no prime is factor to the given number then it is a prime otherwise composite.

Eg: 221
The nearest integer to the square root of 221 is 15.
Prime numbers less than 15 are: 2,3,5,7,11,13
Verification:
2 is not a factor of 221
3 is not a factor of 221
5 is not a factor of 221
7 is not a factor of 221
11 is not a factor of 221
13 is  a factor of 221,  13x17=221. So, 221 is not a prime number.

Eg: 229
The nearest integer to the square root of 229 is 15.
Prime numbers less than 15 are: 2,3,5,7,11,13
Verification:
2 is not a factor of 229
3 is not a factor of 229
5 is not a factor of 229
7 is not a factor of 229
11 is not a factor of 229
13is not a factor of 229
.So 229 is a prime number.

2 is the only even prime.otherthan  2 rest of the prime numbers are odd.

Product of any two prime numbers other than 2 is odd.
Product of any two prime numbers if one of the number is 2, then it is even.
Sum of any two prime numbers other than 2 is even.
Sum of any two prime numbers if one of the number is 2, then it is odd.






S-BATCH