In mathematics, a **repunit** (from the words *repeated* and *unit*) is a number like 11, 111, or 1111 that consists of **rep**eated **unit**s, or 1's. A mathematical shorthand for a repunit is a capital "R" subscripted with the number of repeated units. 11 is therefore R_{2}, 111 R_{3}, and 1111 R_{4}. 11 is the __first__ repunit and 111 the second, however, because although 1 is R_{1}, 1, for obvious reasons, is not a repunit.

A **repunit prime** is simply a repunit that is a prime number. For a repunit R_{n} to be prime, it is a necessary but not sufficient condition that the number (or sum) of its digits also be prime. For example, R_{3}, R_{5}, R_{7} are not primes. Indexes for which repunits are primes are {2, 19, 23, 317, 1031, ...}. It is not known whether there are infinitely many prime repunits. Prime repunits are similar to a special class of primes that remain primes after any permutation of their digits. They are called permutable primes or absolute primes.

In binary, all repunit primes are also Mersenne primes.

**See also**:

**Note**: Some mathematical theoreticians regard the repunit as an arbitrary concept, arguing that it depends on the use of decimal numerals. But other mathematical theoricians justify the concept with the mathematical formula (10^N - 1)/9, such as author Paulo Ribenboim. Even this formula can be generalized to any base, if we let B stand for the base number, (B^N - 1)/(B - 1).

**References**

- Repunits at MathWorld: http://mathworld.wolfram.com/Repunit.html
- Factors of base-ten repunits at WorldOfNumbers: http://www.worldofnumbers.com/repunits.htm
- Paulo Ribenboim,
*The Book Of Prime Number Records*.