Mersenne prime variation

146 Views Asked by At

Mersenne primes are primes of the form $2^p-1$ where $p$ is some prime. I am wondering if primes of the from $q^p-2$ have been studied where $q>2$ is a prime and $p$ is also a prime. Are there primes of this form? Are there many of them?

Thanks in advance.

3

There are 3 best solutions below

1
On BEST ANSWER

There are certainly numbers of that form that are prime, some examples:

  • $3^2-2 = 7$
  • $3^4-2 = 79$
  • $3^5-2 = 241$
  • $5^2-2 = 23$
  • $7^2-2 = 47$

and some numbers of that form that are not prime:

  • $3^3-2 = 25 = 5\cdot 5$
  • $5^3-2 = 123 = 3\cdot 41$
  • $5^4-2 = 623 = 7\cdot 89$

One of the reasons the concept of Mersenne primes is so known is that it's relatively simple to test Mersenne numbers for primality (it's quite basic to show that the exponent must be prime, which is just a simple prerequisite, but one that eliminates a fair number of candidates). I haven't heard of any tests optimised for numbers of this form (and as some of the examples show, we don't have a similar simple rule for the exponents), which probably makes these numbers much less studied.

As a result of that much less is probably known, including whether there are infinitely many.

4
On

You can observe that even the case $q=3$ could be (is) hard, because $$3^p-2=(2+1)^p-2=\sum_{k=0}^{p-1}{p \choose k}2^{p-k}-1$$ and this expression is more complicated than that one for Mersenne primes $2^p-1$.

A short remark: If you want to generate primes of the form $6k+1$ with sequences $q^p-2$ where $p$ and $q$ are primes then because $q^p-2=6k+1$ implies $q=3$ you can observe that the only prime number $q$ of all the primes for which the expression $q^p-2$ can give a prime of the form $6k+1$ is the prime $q=3$.

1
On

we have the following:

  • $q\equiv 3\bmod 5\implies p\not\equiv 3\bmod 4 \hspace{30pt}\text{$q\equiv 2\bmod 5\implies p\not\equiv 1\bmod 4$}$
  • $q\equiv 2\bmod 7\implies p\not\equiv 1\bmod 3\hspace{30pt}q\equiv 4\bmod 7\implies p\not\equiv 2\bmod 3$
  • $q\equiv 2\bmod 11\implies p\not\equiv 1\bmod 10\hspace{30pt}q\equiv 6\bmod 11\implies p\not\equiv 9\bmod 10$
  • $q\equiv 7\bmod 11\implies p\not\equiv 3\bmod 10\hspace{30pt}q\equiv 8\bmod 11\implies p\not\equiv 7\bmod 10$
  • etc.

all by figuring out orders mod primes and discrete logs of 2.