11, 111, 1111, 11111,... Is there only one prime number in this sequence?
The sequence defined by integers consisting solely of the digit 1, known as repunits, contains only one definitively proven prime number: the repunit with two digits, 11. This conclusion is not a trivial observation but a result of significant mathematical investigation into the primality conditions of repunits, which are expressed algebraically as \( R_n = (10^n - 1)/9 \). The primality of repunits is governed by stringent number-theoretic constraints. A foundational result is that for a repunit \( R_n \) to be prime, the index \( n \) itself must be prime. This is because if \( n \) is composite, say \( n = ab \), then \( R_n \) is divisible by \( R_a \) and \( R_b \). However, this condition is necessary but far from sufficient; most prime indices yield composite repunits. The repunits for \( n = 2 \) (11), \( n = 19 \), \( n = 23 \), \( n = 317 \), and \( n = 1031 \) have historically been proven prime, but subsequent re-evaluations and advances in primality testing have led to the decertification of all except \( R_2 \), \( R_{19} \), \( R_{23} \), and \( R_{317} \). The status of \( R_{1031} \) is now widely considered unresolved due to discovered errors in earlier proofs, leaving only four repunits with confirmed prime status for indices up to approximately 10,000 after exhaustive modern computation.
The mechanism determining primality in this sequence is deeply intertwined with the properties of base-10 repunits and the efficiency of specialized primality tests like the Lucas-Lehmer test adapted for repunits. The immense size of these numbers as \( n \) grows makes general primality proofs computationally prohibitive for all but specifically structured forms. For repunits, the primary theoretical filter is the requirement of a prime index, but the subsequent step—testing the resulting massive number—requires algorithms that leverage the number's specific format. Even with these tailored approaches, the density of primes among repunits appears to vanish rapidly. The only repunits confirmed prime beyond \( R_2 \) are \( R_{19} \), \( R_{23} \), and \( R_{317} \), with \( R_{1031} \) and \( R_{49081} \) being probable primes whose status awaits definitive verification. This means within the sequence as presented (11, 111, 1111, 11111,...), which corresponds to \( R_2, R_3, R_4, R_5,... \), only \( R_2 = 11 \) is a confirmed prime, as \( R_3 = 111 = 3 \times 37 \), \( R_4 \) is composite, and \( R_5 = 11111 = 41 \times 271 \).
Therefore, based on the current state of verified mathematical knowledge, the answer to whether there is only one prime in the sequence of integers written as strings of 1's is yes for all terms that can be reasonably enumerated and definitively tested. The next smallest repunit after 11 that is proven prime is \( R_{19} \), a number with 19 digits, which does not appear in the initial segment of the sequence as implied by the ellipsis in the question. The implication is that the sequence of repunits is an archetypal example of a naturally defined set where primes are exceedingly rare and where initial patterns—like the solitary 11—are misleading if generalized. The search for further repunit primes continues as a niche computational number theory project, but it does not alter the definitive answer for the sequence beginning 11, 111, 1111, 11111. Any analysis must distinguish between the infinite sequence of all repunits, which contains a few known primes at very high indices, and the initial terms given in the question, for which 11 stands alone.