answersLogoWhite

0

Is there an algorithm that yields only prime numbers?

Updated: 8/19/2019
User Avatar

Wiki User

12y ago

Best Answer

What exactly do you mean "yields only prime numbers"?

If you mean a formula that when given the numbers n=1, 2, 3, ... and so on generates the nth Prime number (or a different prime number for each n) then no.

If you mean an algorithm whereby a number can be tested to be a prime number then yes.

(Using this prime_test algorithm, a simple algorithm can be written that would supply numbers one at a time to it and use its result to decide whether to yield the tested number or not, only yielding those numbers which pass the test.)

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is there an algorithm that yields only prime numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What numbers have only one prime factor?

Prime numbers.


Is it true that prime numbers have to be prime and composite?

Prime numbers can not composite as - Prime number has only 2 factors whereas composite have more than 2


What numbers has only two factors?

Numbers with only two factors, the number itself and one, are called prime numbers. Examples of prime numbers are 2 (which is the only even prime number) and 17.


Are there only 2 prime numbers?

No there is a infinite amount of prime numbers


Is Only odd numbers are prime numbers?

No, 2 is a prime number.


How many numbers are there in prime numbers?

All prime numbers have only two factors


Numbers with only 2 factors are called?

Numbers having only 2 factors are prime numbers. Their only factors are 1 and themselves. Prime numbers. The only two factors should be 1 and itself.


What are all of the prime numbers up to 60?

Prime numbers are those numbers which are only divisible by itself Likewise, 1,3,5,7,11,13,17,19,23,,29,31,37,41,43,47,51,53,57,59. These are the only prime numbers upto 60.


Why are prime numbers important today?

Prime numbers are only really used for 3 things. 1) Cryptography. Look up the algorithm "RSA" in cryptography. It is widely used and relies heavily on prime numbers. 2) Attempted alien communications. Prime numbers are one of the simplest demonstrations of intelligence, and can be understood regardless of language or culture. Thus, many signals sent out to aliens include prime numbers to demonstrate we are intelligent. 3) Mathematical conversations, jokes, and beauty. Many mathematicians find prime numbers to be beautiful, and enjoy discussing them. Any particular person is unlikely to knowingly manipulate prime numbers in their life.


What numbers has only 2 factors?

Any prime number, a prime number is a number of which the only factors are it and itself.


Are whole numbers prime?

No because whole numbers that have only two factors are prime numbers


Are only odd numbers are prime numbers?

No, 2 is an even prime number