Problem
NT-B2-M11-P007 Primality of a Repunit
#7
★★★☆☆ Level 3 of 5
The number \(R_k=11\ldots1\), consisting of \(k\) ones, is prime. Prove that \(k\) is prime.
1001 Problems in Classical Number Theory (method inspiration) · Problem 260
Assume \(k=ab\), and group the ones into blocks of length \(a\).
If \(k=ab\), where \(a,b>1\), then
\[R_k=1+10+\cdots+10^{ab-1}=R_a(1+10^a+10^{2a}+\cdots+10^{a(b-1)}).\]
Both factors are greater than \(1\), so \(R_k\) is composite. This is a contradiction. Hence \(k\) is prime.
It is important to say that the converse is false: even for prime \(k\), the repunit may be composite.