When is $2^{2n}-1$ prime?

113 Views Asked by At

I am trying to find the biggest prime number smaller than $10^{7}$ that can be written in the form $2^{2n}-1$, where $n$ is any real number. For example, I plugged in $1.5=n$ and found a prime number. I know I could use trial and error but I think there is an easier way. I have been able to reduced the problem to $2^{n}-1$ and have tried to find a pattern but have been unsuccessful. I would appreciate it if anyone could give me a hint on how to approach this problem.

2

There are 2 best solutions below

1
On BEST ANSWER

If you allow $n$ to be any real, you can express any prime $p$ this way. You have $$2^{2n}-1=p\\2n=\log_2 (p+1)\\n=\frac 12(\log_2 (p+1))$$ so the largest prime less than $10^7$ is the one you want.

0
On

If $n$ is any real, as Ross said above, $2^{2n}-1=p\iff n=\frac 12\log_2(p+1)$, and thus, any prime can be written that way. If you restrict $n$ to be an integer, the answer is, never, except $n=1$, as, $2^{2n}-1=(2^n-1)(2^n+1)$, and if $2^n-1>1$, this object is never a prime.