-1

Prove that if $\underbrace{11...11}_{n}$ is a prime number, also $n$ is a prime number.

There's already a similar thread here, but because of this weird requirement about having at least 50 reputation, I can't add a comment to ask for clarification…

So, don't all those proofs show only that if n is composite, also the number is composite, which doesn't necessarily need to mean that if the number is prime, then also n is prime?

EDIT: As I mentioned at the beginning, I know there's already a thread with a similar question, and that I only asked this one because I couldn't add a comment there. There's nothing more I can add to my question to make it different. If anyone has a problem with it, then they can close the question...

Konrad
  • 11
  • 1
    Welcome to MSE. A question should be written in such a way that it can be understood even by someone who did not read its title. – José Carlos Santos Sep 03 '23 at 10:56
  • 3
    Besides, yes, asserting that $n$ is composite implies that $11\dots1$ ($n$ times) is composite is exactly the same thing as asserting that $11\dots1$ ($n$ times) is prime implies that $n$ is prime. – José Carlos Santos Sep 03 '23 at 10:59
  • 2
    Are you familiar with the contrapositive of an if-then statement? – paw88789 Sep 03 '23 at 11:00
  • This type of inference is called contrapositive. If N, P are respectively the propositions that n or p (=1...11) is composite then N --> P proves that not P --> not N. – Jam Sep 03 '23 at 11:01
  • 1
    "If today is Tuesday, this must be Belgium" is exactly equivalent to "If this isn't Belgium, then today is not Tuesday". – Gerry Myerson Sep 03 '23 at 11:20
  • I think I might have heard about contraposition before, but forgot about it. It seems to make sense now, although I still need to analyze it more. Thanks for the comments. – Konrad Sep 03 '23 at 11:56
  • This is a duplicate of "$R_n=\frac{10^n-1}{9}$ can only be prime if $n$ is prime". – Peter Sep 03 '23 at 14:44
  • 1
    That $n$ is prime is necessary , but not sufficient for the primality of the number. In fact, only a few such primes are known. – Peter Sep 03 '23 at 14:45
  • @Peter RE your comment on necessary/sufficient: What (if anything) is known about constraints on $p$ such that $p$ catenated $1$s is a prime? – Keith Backman Sep 04 '23 at 15:14

1 Answers1

-2

Detailed answer:

Let us prove the statement by contraposition. If $n$ is not prime, then $n = ab$ for a prime $a$ and an integer $b$. Consequently $$ R_n = \frac{10^{ab}-1}{9}=\frac{(10^a)^b-1}{9}. $$ However, with the geometric series, we get $$ (10^a)^b-1 = (10^a - 1) \sum_{i=0}^{b-1}(10^a)^{i} $$ and therefore we have $$ R_n = \frac{10^a - 1}{9}\sum_{i=0}^{b-1}(10^a)^{i}. $$ This implies that $$ \sum_{i=0}^{b-1}(10^a)^{i} $$ is a divisor of the repunit $R_n$. Thus, if $n$ is not prime, then $R_n$ is not prime either. Conversely, $n$ must be prime if $R_n$ is prime.

The repunits have this form and that is easily shown and understood. Hope this answer is fine as this may be a duplicate.