Regarding the question, the prime must be a natural number, so n>0. I used Mathematica to test for primes for n ranging from $1$ to $10^5$. All of them were not prime aside from $n=1$, which gives you $2$. I believe contradiction would be used for proving that there are no other primes of this form. I am just not sure where to go from there.

Thank you for your assistance.

  • 6
    $\begingroup$ Well, $3^n-1$ is even, right? $\endgroup$ – carmichael561 Jan 17 '17 at 17:41
  • 3
    $\begingroup$ $3^n$ tends to be quite odd ... $\endgroup$ – Hagen von Eitzen Jan 17 '17 at 17:41
  • 2
    $\begingroup$ $3^n-1$ is even for every $n$, and the only even prime is $2$. $\endgroup$ – barak manos Jan 17 '17 at 17:42
  • 2
    $\begingroup$ I'll upvote this for exploring with Mathematica. But having seen the result you guessed, you should have written down the values of $3^2-1$, $3^3-1$ and $3^4-1$, Then you might have noticed that you were gettng even numbers - see @Reese 's answer. $\endgroup$ – Ethan Bolker Jan 17 '17 at 17:47
  • 2
    $\begingroup$ @TheCount: While you are allowed to start counting with one, some of us consider zero a natural number. Zero is not a prime (zero divisors are excluded by definition) $\endgroup$ – hardmath Jan 17 '17 at 17:51

A good approach to problems of this form is to assume (1) that there are no primes of this sort other than the easy example, and (2) that there's a simple reason, like a single number that must divide all of them. To determine what this "simple reason" is, look at the first few examples: $2, 8, 26, 80, \ldots$. The one factor these all have in common is $2$. So it's reasonable to suppose that every example will be even; we just need to know why. But then the answer is evident: $3^n$ is a product of odd numbers, so it will always be odd. An odd number minus one is always even. And if $n > 1$, then $3^n$ will be greater than $3$, so $3^n - 1$ will always be an even number greater than two - and hence will not be prime.


A little mistake when you say "for $n=0$ is gives you $2$", you want to say "for $n=1$.

Otherwise, notice that

$$3^n-1=0\pmod 2$$

(it is always even since $3^n$ is always odd).

So $3^n-1$ can not be a prime once it is greater than $2$. Therefore, the only case acceptable if $3^n-1=2$, which is the case for $n=1$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.