answersLogoWhite

0


Best Answer

Instead of checking every single number from 1 to the number itself, check only from 1 to the square root of that number, that's because multiples come in pairs, and those pairs are made of numbers on each side of the square root (or, the square root itself).

For example: 16. sqrt of 4, multiples are:

  • 1(<4) x 16(>4)
  • 2(<4) x 8(>4)
  • 4 x 4(=4)
So instead of going through 2 to 16, you'd only need to go from 2 to 4 to see whether it's prime or not. You save a lot of work (on an exponential rate).
User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a faster way to find out if a number if a prime or composite number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you check if a number is prime or a composite number?

A number is prime when it only has one and itself as factors is prime. Therefore, to tell if a number is prime or composite simply find it's factors. If it has more than two factors than it is not a prime number, it is composite.


What is the method to find the prime factors of a composite number?

prime numbers


What Method used to find composite numbers?

To find a composite number, check if the number can be divided by 2,3,4,5, ect. If it can, it`s composite. If not, it`s prime.


Is 1155 prime composite or neither?

1155 is obviously a multiple of 5 and a multiple of 11, so it is a composite number.


How do you find that any number is a prime number or composite number?

A prime number has only 2 factors which are 1 and itself. Composite numbers are everything else except 1 and 0. 1 and 0 are neither prime, nor composite.


Which is greater prime or composite numbers?

There are more composite numbers than prime numbers, but there is no prime or composite number so great that you can't find a greater one of either kind.


To find a composite number why divide by prime numbers?

You could try dividing by composite numbers but the number that you are testing is divisible by a composite number, then it will be divisible by a prime factor of that composite number and that prime factor will be smaller. It is always easier to work with smaller numbers.


How do you find out if a number is a prime or composite?

Factor it. Prime numbers have two factors, composite numbers have more than two.


How do you find the LCM of a composite number?

You need at least two numbers to find an LCM. It doesn't matter whether they are prime or composite.


How do you find prime and composite numbers?

By factoring them. Prime numbers have only two factors. Composite numbers have three or more.


How do you find out if a number is a prime or composite number?

Find the factors of the number. If the only factors are 1 and itself, it is prime.A prime number is a positive integer with two factors: one and the number itself.A composite number is a positive integer with more than two factors.


Do you need to know all the factors of a number in order to determine if it is a prime or composite?

No. There are techniques to find if it is prime