answersLogoWhite

0

Suppose you want to find out if a number P is prime. For small P the method is simple:

You try to divide P by 2, then 3 and then by the next prime number until you reach sqrt(P). If any one of these primes divides P without remainder then P is not a prime, and if you have still not found a factor after trying sqrt(P) then P is a prime.

So far it is simple. The problem is that this method becomes quite time consuming for large P so that it is not a practical method for determining the primality of large numbers. There are methods, but you do need to know advanced mathematics. Follow the attached link if you think that you are up to it.

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

What are the steps to determining whether a number is prime or composite?

While there are many ways to determine whether a number is prime or composite, there are easy ways to check numbers up to 100:Try factoring the number. A prime numbers has exactly two factors, 1 and the number itself, and a composite number has one or more factors in addition to 1 and the number itself.All numbers greater than 2 and less than 49 are composites if they are even numbers, if they are multiples of 3, or if they end in 5 or 0.Composite numbers 8 to 100 include the above and all numbers divisible by 7.Test larger numbers by trial division by larger primes that are less than the square root of the number.


If you prime factorize a number and you use the ladder method why do you always have to divide by prime numbers?

It's more efficient. You want to end up with all prime numbers. You could divide by a composite number, but you'd just have to break that number down later. It saves steps.


Design a algorithm to generate all prime numbers within the limits l1 and l2?

Algorithm: to generate all prime numbers between the limits l1 and l2.Input: l1 and l2Output: Prime numbers between l1 and l2Method:for (n=l1 to l2 in steps of 1 do)prime=truefor (i=2 to n/2 in steps of 1 do)if (n % i =0)prime = falsebreakend_ifend_forif (prime = true)Display 'Prime number is =', nend_for


How and what steps do you take to figure out the prime factorization of the number 62?

Since 62 is even, divide by 2. Since the result is prime, stop. 2 x 31 = 62


What steps do you take to determine the exact number of possible combinations for each set of cubes?

First you try to solve it, but you will soon realize that there is only two steps. Guess and Check.

Related Questions

How can you determine whether an interval is major or minor?

You can determine whether an interval is major or minor by counting the number of half steps between the two notes. If the interval has a distance of 2, 3, 6, or 7 half steps, it is major. If it has a distance of 1, 4, 5, or 8 half steps, it is minor.


How can one determine whether an interval is major or minor?

The key difference between a major and minor interval is the number of half steps between the two notes. In a major interval, there are typically two whole steps (or four half steps) between the notes, while in a minor interval, there are typically one and a half steps (or three half steps) between the notes. By counting the number of half steps between the two notes in the interval, one can determine whether it is major or minor.


The steps on how to divide 127 to 36.00?

No, it is a prime number.


Is 239 a prime number show me the steps?

cuz it is


What are the steps to determining whether a number is prime or composite?

While there are many ways to determine whether a number is prime or composite, there are easy ways to check numbers up to 100:Try factoring the number. A prime numbers has exactly two factors, 1 and the number itself, and a composite number has one or more factors in addition to 1 and the number itself.All numbers greater than 2 and less than 49 are composites if they are even numbers, if they are multiples of 3, or if they end in 5 or 0.Composite numbers 8 to 100 include the above and all numbers divisible by 7.Test larger numbers by trial division by larger primes that are less than the square root of the number.


What is the formula to calculate the rise and run of a staircase when designing deck steps?

The formula to calculate the rise and run of a staircase for deck steps is to divide the total height of the staircase by the desired number of steps to determine the rise, and then divide the total depth of the staircase by the number of steps to determine the run.


What are the fours steps of the nonviolent campaign?

collection of the facts to determine whether injustices exist;negotiation;self-purificationdirect action


How can one determine the oxidation number of an element in a chemical compound?

To determine the oxidation number of an element in a chemical compound, you need to follow these steps: Identify the element in the compound. Determine the common oxidation states for that element. Assign the oxidation number based on the compound's overall charge and known rules for assigning oxidation numbers. By following these steps, you can accurately determine the oxidation number of an element in a chemical compound.


If you prime factorize a number and you use the ladder method why do you always have to divide by prime numbers?

It's more efficient. You want to end up with all prime numbers. You could divide by a composite number, but you'd just have to break that number down later. It saves steps.


Design a algorithm to generate all prime numbers within the limits l1 and l2?

Algorithm: to generate all prime numbers between the limits l1 and l2.Input: l1 and l2Output: Prime numbers between l1 and l2Method:for (n=l1 to l2 in steps of 1 do)prime=truefor (i=2 to n/2 in steps of 1 do)if (n % i =0)prime = falsebreakend_ifend_forif (prime = true)Display 'Prime number is =', nend_for


How and what steps do you take to figure out the prime factorization of the number 62?

Since 62 is even, divide by 2. Since the result is prime, stop. 2 x 31 = 62


What steps do you take to determine the exact number of possible combinations for each set of cubes?

First you try to solve it, but you will soon realize that there is only two steps. Guess and Check.