1

Suppose $N=111\dots1$ ($n$ ones). For which numbers $n$ is $N$ prime?

$n \ne 1, 3k$ is all progress I have made!

  • All composite n does not work – Brian Cheung May 08 '17 at 12:08
  • 3
    If there are $n$ digits in the representation, the number can be represented as $(10^n - 1)/9$. – Toby Mak May 08 '17 at 12:10
  • I would write $N$ as $$\sum_{k=0}^{n-1} 10^k $$. That way $n$ will be the number of digits in $N$. – gen-ℤ ready to perish May 08 '17 at 12:12
  • I found out that $n \ne 4k$, where $k$ is a positive integer. The reason is that since $1111$ | $101$, $1111 1111$ (8 digits) can be represented as $1111 * 110011$, $1111 1111 1111$ (12 digits) can be represented as $1001* 111000111$ and so on. – Toby Mak May 08 '17 at 12:18
  • The only $n$ I have been able to find that makes this prime (through limited trial and error) is $n=2$. Not a clue how to prove if this is the only answer though – lioness99a May 08 '17 at 12:19
  • You might want to see this @Edi: This question (https://math.stackexchange.com/questions/1485350/factor-10n-1) relates to this question as well. – Toby Mak May 08 '17 at 12:29
  • Some primes of this form are known: https://oeis.org/A004023 – Michael Stocker May 08 '17 at 12:39

1 Answers1

1

It is a well-known open problem to establish whether there exist infinitely many Mersenne primes, i.e., primes of the form $2^p-1$ for some prime $p$.

This question is its analogue which replaces $2$ with $10$. Indeed, if $\frac{1}{9}(10^n-1)$ is prime then $n$ is necessarily prime because $\frac{1}{9}(10^m-1)$ divides $\frac{1}{9}(10^n-1)$ whenever $m$ divides $n$.

Edit: It can be checked that $$ \{n\in [2,1000]: \frac{10^n-1}{9}\text{ is prime}\}=\{2,19,23,317\}. $$ Michael Stoker points out in the above comments also this longer OEIS sequence.

A related MSE question here.

Paolo Leonetti
  • 15,554
  • 3
  • 26
  • 60