# Repunit

A repunit is a number like 11, 111, or 1111. It only has the digit 1 in it. It is a more specific type of repdigit. The term stands for repeated unit and was coined in 1966 by Albert H. Beiler in his book Recreations in the Theory of Numbers.[note 1]

A repunit prime is a repunit that is also a prime number. Primes that are repunits in base-2 are Mersenne primes.

## Definition

The base-b repunits can be written as this where b is the base and n is the number that you are checking in whether or not it is a repunit:

${\displaystyle R_{n}^{(b)}\equiv 1+b+b^{2}+\cdots +b^{n-1}={b^{n}-1 \over {b-1}}\qquad {\mbox{for }}|b|\geq 2,n\geq 1.}$

This means that the number Rn(b) is made of of of n copies of the digit 1 in base-b representation. The first two repunits base-b for n = 1 and n = 2 are

${\displaystyle R_{1}^{(b)}={b-1 \over {b-1}}=1\qquad {\text{and}}\qquad R_{2}^{(b)}={b^{2}-1 \over {b-1}}=b+1\qquad {\text{for}}\ |b|\geq 2.}$

The first of repunits in base-10 are with

1, 11, 111, 1111, 11111, 111111, ... (sequence A002275 in the OEIS).

Base-2 repunits are also Mersenne numbers Mn = 2n − 1. They start with

1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, ... (sequence A000225 in the OEIS).

## Factorization of decimal repunits

Prime factors that are red are "new factors" that haven't been mentioned before. Basically, the prime factor divides Rn but does not divide Rk for all k < n. (sequence A102380 in the OEIS)[2]

 R1 = 1 R2 = 11 R3 = 3 · 37 R4 = 11 · 101 R5 = 41 · 271 R6 = 3 · 7 · 11 · 13 · 37 R7 = 239 · 4649 R8 = 11 · 73 · 101 · 137 R9 = 32 · 37 · 333667 R10 = 11 · 41 · 271 · 9091
 R11 = 21649 · 513239 R12 = 3 · 7 · 11 · 13 · 37 · 101 · 9901 R13 = 53 · 79 · 265371653 R14 = 11 · 239 · 4649 · 909091 R15 = 3 · 31 · 37 · 41 · 271 · 2906161 R16 = 11 · 17 · 73 · 101 · 137 · 5882353 R17 = 2071723 · 5363222357 R18 = 32 · 7 · 11 · 13 · 19 · 37 · 52579 · 333667 R19 = 1111111111111111111 R20 = 11 · 41 · 101 · 271 · 3541 · 9091 · 27961
 R21 = 3 · 37 · 43 · 239 · 1933 · 4649 · 10838689 R22 = 112 · 23 · 4093 · 8779 · 21649 · 513239 R23 = 11111111111111111111111 R24 = 3 · 7 · 11 · 13 · 37 · 73 · 101 · 137 · 9901 · 99990001 R25 = 41 · 271 · 21401 · 25601 · 182521213001 R26 = 11 · 53 · 79 · 859 · 265371653 · 1058313049 R27 = 33 · 37 · 757 · 333667 · 440334654777631 R28 = 11 · 29 · 101 · 239 · 281 · 4649 · 909091 · 121499449 R29 = 3191 · 16763 · 43037 · 62003 · 77843839397 R30 = 3 · 7 · 11 · 13 · 31 · 37 · 41 · 211 · 241 · 271 · 2161 · 9091 · 2906161

The smallest prime factors of Rn for n > 1 are

11, 3, 11, 41, 3, 239, 11, 3, 11, 21649, 3, 53, 11, 3, 11, 2071723, 3, 1111111111111111111, 11, 3, 11, 11111111111111111111111, 3, 41, 11, 3, 11, 3191, 3, 2791, 11, 3, 11, 41, 3, 2028119, 11, 3, 11, 83, 3, 173, 11, 3, 11, 35121409, 3, 239, 11, ... (sequence A067063 in the OEIS)

## Footnotes

### Notes

1. Albert H. Beiler coined the term “repunit number” as follows:

A number which consists of a repeated of a single digit is sometimes called a monodigit number, and for convenience the author has used the term “repunit number” (repeated unit) to represent monodigit numbers consisting solely of the digit 1.[1]

### References

1. Beiler 2013, pp. 83