# Thread: does this formula generate infinitely many primes?

1. ## does this formula generate infinitely many primes?

Define
f(1) = 2
f(n+1) = 2^f(n) - 1 (for n>=1)

so f(1) = 2, f(2) = 3, f(3) = 7, f(4) = 127, and
f(5) = 170141183460469231731687303715884105727 (39 digits)

f(n) is known to be prime for n = 1, 2, 3, 4, 5.

Conjecture: f(n) is prime for all n.

I thought of this when I was a teenager, and I thought I'd get round to proving it when I was good enough at maths. That never happened. But it still seems like an interesting problem to me. Has anyone ever thought about it?

It has certainly never been proved to be true, because if it had been then there would be no largest known prime.

I don't think anyone could have ever found a counterexample, either. To test whether f(6) is prime would probably take all the computers in the world a trillion years to calculate. (I haven't actually estimated it, but I am fairly sure that f(6) is much too big for it to be possible.)

2. f(5) isn't a prime.

f(5)=2^(127)-1 which is one of the original Mersenne Primes that was actually a composite and shown to be false for the original Mersenne Conjecture.

Mersenne conjectures - Wikipedia, the free encyclopedia

*edit*
Actually I'm wrong. Somehow I read 127 as 257. :P

3. Originally Posted by edd
Define
f(1) = 2
f(n+1) = 2^f(n) - 1 (for n>=1)

so f(1) = 2, f(2) = 3, f(3) = 7, f(4) = 127, and
f(5) = 170141183460469231731687303715884105727 (39 digits)

f(n) is known to be prime for n = 1, 2, 3, 4, 5.

Conjecture: f(n) is prime for all n.

I thought of this when I was a teenager, and I thought I'd get round to proving it when I was good enough at maths. That never happened. But it still seems like an interesting problem to me. Has anyone ever thought about it?

It has certainly never been proved to be true, because if it had been then there would be no largest known prime.

I don't think anyone could have ever found a counterexample, either. To test whether f(6) is prime would probably take all the computers in the world a trillion years to calculate. (I haven't actually estimated it, but I am fairly sure that f(6) is much too big for it to be possible.)
The Online Encyclopedia of integer sequences says: