Numbers $n$ of the form $10^{m}(2^{k}−1)+2^{k-1}−1$, where $m$ is the number of decimal digits of $ 2^{k-1}$. For example:

  • $k=1$ then $n=10$.
  • $k=2$ then $n=31$.
  • $k=3$ then $n=73$.
  • $k=4$ then $n=157.$


the number $(2^k-1)\cdot 10^m+2^{k-1}-1$ where $m$ is the number of decimal digits of $2^{k-1}$ is never prime when it is of the form $7s+6$, that is when it is congruent to $6$ $\pmod 7$. Examples: $n=1023511$ ($k=10$)$\equiv 6 \pmod 7$ and thus it is composite $(1023511=19\times103\times523)$, $n=20471023$ ($k=11$) $\equiv 6 \pmod 7$ and thus it is composite ($20471023=479\times42737)$. With PFGW we arrived to $k=565000$ and all the $n's$ congruent to $6 \pmod 7$ are composite. According to Giovanni Resta's calculations in a post which has been canceled, there should be no probable prime congruent to 6 $\pmod 7$ upto k=800.000. The residue $6$ $\pmod 7$ occurs when either $m=6t+3$ and $k=3l+1$ or $m=6t+4$ and $k=3l+2$ with $k$ and $l$ some non-negative integers, but amazingly when it occurs the number is not prime. Can you find a counter-example or give a proof for the conjecture? Here a link to other interesting questions: Is there a number of the form $f(n)=7k+6=5p$ with prime p? and Why do all residues occur in this similar sequence? For primes of this form see: The on-line Encyclopedia of integer sequences The following vector contains all the exponents k<=366800 leading to a prime

$[2, 3, 4, 7, 8, 12, 19, 22, 36, 46, 51, 67, 79, 215, 359, 394, 451, 1323, 2131, 3336, 3371, 6231, 19179, 39699, 51456, 56238, 69660, 75894, 79798, 92020, 174968, 176006, 181015, 285019, 331259, 360787, 366770]$

Exponent $541456$ leads to another probable prime with residue 5 mod 7 and 325990 digits, but it need not be the next in increasing order.

Remark: we found five-in-a-row probable primes with res 5 mod 7. Probable primes with residue 5 are now twice frequent than expected. Exponents of these primes seem to be NOT random at all. Another thing I noticed, i don't know if it has some importance: the exponents leading to a probable prime $215, 69660, 92020, 541456$ are multiples of $43$. I noticed that $\frac{215}{41}, \frac{69660}{41}, \frac{92020}{41}, \frac{541456}{41}$ all have a periodic decimal expansion equal to $\overline{24390}=29^3+1$. This is equivalent to say that when k is a multiple of 43 and the number $10^{m}(2^{k}−1)+2^{k-1}−1$ is prime, then k is of the form $41s+r$ where r is a number in the set (1,10,16,18,37). Is there some mathematical reason for that?

  • 2
    $\begingroup$ github.com/gnufinder/special-prime/issues $\endgroup$ – Peter Feb 22 '18 at 16:56
  • 5
    $\begingroup$ How can you give a bounty of $200$ when you only have $116$ reputation? $\endgroup$ – Mr Pie Mar 5 '18 at 6:52
  • 1
    $\begingroup$ mathoverflow.net/questions/294527/… $\endgroup$ – Peter Mar 6 '18 at 12:02
  • 3
    $\begingroup$ It's worth to mention that if $n = (2^k-1)\cdot 10^m + 2^{k-1}-1$, then $2n+1=(2\cdot 10^m + 1)(2^k - 1)$. In particular, $n$ can never be a Sophie Germain prime. $\endgroup$ – Max Alekseyev Mar 6 '18 at 17:22
  • 3
    $\begingroup$ Please reduce your editing of this post. It is not necessary to keep the search limit quite up to date in the post. If you want to have the current search limit on the page, post a comment (and delete it when you post the next). Updating the post once or twice a week is plenty enough. $\endgroup$ – Daniel Fischer Mar 9 '18 at 11:48

According to your list, a counter-example, if it exists, must have more than $60,000$ digits. So, a counterexample would be a quite gigantic prime.

Unfortunately, a proof of the conjecture will almost certainly be out of reach.

The search for a counter-example can be painful as well, it is well possible that the smallest is already too big for current algorithms for primality testing.

  • 2
    $\begingroup$ @EnzoCreti No, this is only known for arithmetic progressions of the form $an+b$ with coprime $a$ and $b$ (Dirichlet). The numbers here will behave like "random" numbers , hence we won't be able to rule out a large prime. $\endgroup$ – Peter Feb 5 '18 at 12:33
  • 3
    $\begingroup$ @Peter Every number is of the form $10^{m}(2^k-1)+2^{k-1}-1$, where $m$ is the number of decimal digits of $2^{k-1}$. As $\log_{2}10$ is irrational, the residues of $m$ and $k$ modulo 6, and hence the residues of $10^{m}$ and $2^{k-1}$ modulo 7, are independent. You can find out the distribution simply by tabulating the possible cases. $\endgroup$ – Taneli Huuskonen Feb 6 '18 at 16:03
  • 3
    $\begingroup$ My observation just explains why different residues modulo 7 occur at different frequencies. $\endgroup$ – Taneli Huuskonen Feb 6 '18 at 19:34
  • 2
    $\begingroup$ math.stackexchange.com/questions/2658464/… $\endgroup$ – Peter Feb 20 '18 at 18:51
  • 2
    $\begingroup$ For $k=32$, we have the factorization $$131\cdot 4463\cdot 21601\cdot 44623 \cdot 76213$$ This is a counterexample with residue $6$ $\endgroup$ – Peter Feb 21 '18 at 10:57

@peter told me about this and i found it very interesting.
I made this tool, so anybody can help computing. Simply download and run to participate. Just refresh the page to update stats.

With 30-40 person, getting to $n=10^7$ should not be to long.

  • $\begingroup$ How many people participated already ? $\endgroup$ – Peter Aug 3 '18 at 18:46
  • $\begingroup$ @DanaJ have you a routine for Sage whcih allows to test this conjecture? $\endgroup$ – Enzo Creti Dec 3 '18 at 13:45

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.