answersLogoWhite

0

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

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

RossRoss
Every question is just a happy little opportunity.
Chat with Ross
SteveSteve
Knowledge is a journey, you know? We'll get there.
Chat with Steve
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach

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