 0

Why do you use half of the number to find prime?

To test for the factors of any Prime number, you only need to test for numbers up to half of the number, because if the number is not divisible by 2, the next smallest number it would be divisible by is 1, which would make it a prime number.

Similarly, there are no factors of any number greater than half of the original number, other than itself.

Ans 2.

Well, there is certainly no point in trying factors greater than half the number, just as explained above. On the other hand, there is no need to try numbers that big either. If you want to discover whether 1,000,001 is prime you do not need to try numbers up to 500,000; testing up to 997 looking for possible factors is sufficient. The rule is quite simple: try all primes that are less than the square root of the number you are researching. This works because if the target number is divisible by a number greater than its square root, it must also be divisible by a number less than its root.

🙏
0
🤨
0
😮
0
Study guides

21 cards

What is the prime factorization of 34

➡️
See all cards
4.83
6 Reviews  