Monday, March 4, 2013

Prime number Check Trick

 
Prime number check.
Prime numbers are those numbers which are only divisible by one and itself.
1,35,7,11,13,17 and so on……..
For small numbers it is easy to say whether number is Prime number or not.
But for large number like 1189 it is quite difficult to check its prime number test
But here is the trick that can check Prime number test within fraction of seconds.
If the number contains 2 or multiple of 2 at ones place it is not a prime number.
Like 2782, 1322, 1238, 9876 etc.
Whatever is the number use this trick.
Let the number be 89
Divide this number by 8 and then 9, 8+9=17 and 7+1=8
First step      = 89/8 not divisible
Second step = 89/9 not divisible
3rd step          = 89/17 not divisible
Final step     =89/8 not divisible
So the number is Prime number.

Now check number 139
 Important Note   If number contains one at any position doesn’t check the number for one.
First step         =139/3 not divisible
Second Step   = 139/9 not divisible
Third step       = 139/13 not divisible
Final step        = 139/4 not divisible.
So the number is Prime number.


Now check the number 453

First step       = 453/4 not divisible
Second Step = 453/5 not divisible
Third step     = 453/3 = 151.
Since it is divisible so the number is not a Prime number.

This tricks works for a large number also. It will not take your much time to practice this trick.


-->









2 comments:

  1. That doesn't work for all primes........Only some of them

    ReplyDelete

Printfriendly

LinkWithin

Related Posts Plugin for WordPress, Blogger...