This isn't a homework problem, but something I was kicking around. Thus far it has worked for the first 20 primes I could calculate in my head. Does anyone know why this shouldn't work, or an example of it not working for the a specific prime number?(adsbygoogle = window.adsbygoogle || []).push({});

The idea is that all prime numbers can be written in the form of:

{(a+1)n} +a, where a is any number between zero and infinity, and n is also any value of your choice.

Thus examples are: 2n+1, 3n+2, 4n+3....

Love to hear feedback.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Equation for Finding Primes?

**Physics Forums | Science Articles, Homework Help, Discussion**