Question: Given an integer n > 1, to test whether n is prime check to see if it is divisible by a prime number less than

Given an integer n > 1, to test whether n is prime check to see if it is divisible by a prime number less than or equal to its square root. If it is not divisible by any of these numbers, then it is prime. (a) Letn 247 How many prime numbers are less than or equal to the square root of n? Is n divisible by any of these numbers? Yes No Is n prima? Yes No (b) Letn 751. How many prime numbers are less than or equal to the square root of n? Is n divisible by any of these numbers? Yes X (c) Let n = 187 How many prime numbers are less than or equal to the square root of n? is n divisible by any of these numbers? Yes O No Is n prime? Yes No (d) Let 467. How many prime numbers are less than or equal to the square root of n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
