Dodo:
What I was doing wasn't to solve for the prime numbers, but get a way to rewriting them. So I could rewrite seven as 2n+1 using 3 for n (in all my tests I only used prime numbers as n values). Although you get other non-prime numbers if you do it "forward", I thought it was interesting...
That's true! However, if I add this additional equation (which just changes the positive to a negative), it seems to suit a whole lot more numbers!
(a-1)n +a Where both a and n are any number between 0 and infinity such as:
17n+18 (works for 307).
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?
The idea is that all prime numbers can be...