Quantcast
Channel: GMAT Club Forum - Forums > Problem Solving (PS)
Viewing all articles
Browse latest Browse all 462833

General GMAT Questions and Strategies | Easy math trick to check whether a Number is Prime or Not

$
0
0
Aadi01
well you can use following formula to determine validity of prime
for any prime no>3 it can expressed as p=6n+1 or p=6n-1 ; n is the +ve integer value

hope this helps


Aadi01 wrote:

To check whether a number N is prime, adopt the following process.

(a) Take the square root of the number.

(b) Round of the square root to the immediately lower integer. Call this number Z.
For example if you have to check for 181, its square root will be 13. Hence, the value of Z, in this case will be 13.

(c) Check for divisibility of the number N by all prime numbers below z. If there is no prime number below the value of z which divides N then the number N will be prime.

To illustrate :-
The value of \sqrt{239} lies between 15 to 16. Hence, take the value of z as 15.
Prime numbers less than 15 are 2, 3, 5, 7, 11 and 13.
239 is not divisible by any of these.
Hence you can conclude that 239 is a prime number.

P.S. in order to check the divisibility, you should learn Divisibility Rules which are easy and simple, and will take far less time.


...

Viewing all articles
Browse latest Browse all 462833

Latest Images

Trending Articles



Latest Images