Math, asked by ceyonjoseph53, 1 year ago

how to find prime numbers what is the easy method of finding prime number

Answers

Answered by appukingini
3

The only even prime number is 2. ...
 If the sum of a number's digits is a multiple of 3, that number can be divided by 3.
No prime number greater than 5 ends in a 5. ...
Zero and 1 are not considered prime numbers.Except for 0 and 1,
 a number is either a prime number or a composite number.

Testing a number n by all numbers between 2 and n-1 can quickly become prohibitively time-consuming.

For instance, if we wanted to check whether 103 is a prime number in this way, we would have to divide by 3, 4, 5, 6, 7 ... and so on, all the way to 102! Luckily, it's not necessary to test by every single possible factor. It's actually only necessary to test the factors between 2 and the square root of n. If the square root of n isn't a whole number, round up to the nearest whole number and test up to this number instead. See below for an explanation: Let's examine the factors of 100. 100 = 1 × 100, 2 × 50, 4 × 25, 5 × 20, 10 × 10, 20 × 5, 25 × 4, 50 × 2, and 100 × 1. Notice that after 10 × 10, the factors are the same as those before 10 × 10, only reversed. In general cases, we can ignore the factors of n greater than the sqrt(n) because they are just rearrangements of factors smaller than the sqrt(n).Let's look at an example problem. If n = 37, we don't need to test all of the numbers 3 through 36 to determine whether n is prime. Instead, we can test only the numbers between 2 and sqrt(37), rounded up. sqrt(37) = 6.08 - we'll round up to 7.37 is not evenly divisible by 3, 4, 5, 6, and 7, so we can say confidently that it is prime.



Similar questions