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 **rep**eated **unit** and was coined in 1966 by Albert H. Beiler in his book _Recreations in the Theory of Numbers_.

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:

This means that the number _R_<sub>_n_</sub><sup>(_b_)</sup> is made of _n_ copies of the digit 1 in base-_b_ representation. The first two repunits base-_b_ for _n_ = 1 and _n_ = 2 are

The first of repunits in base-10 are with

- 1, 11, 111, 1111, 11111, 111111, ... .

Base-2 repunits are also Mersenne numbers _M_<sub>_n_</sub> = 2<sup>_n_</sup> − 1. They start with

- 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, ... .

## Factorization of decimal repunits

Prime factors that are  are "new factors" that haven't been mentioned before. Basically, the prime factor divides _R_<sub>_n_</sub> but does not divide _R_<sub>_k_</sub> for all _k_ < _n._

|{||_R_<sub>1</sub> =|1||||
| --- | --- | --- | --- | --- | --- |
|_R_<sub>2</sub> =||||||
|_R_<sub>3</sub> =|·|||||
|_R_<sub>4</sub> =|11 ·|||||
|_R_<sub>5</sub> =|·|||||
|_R_<sub>6</sub> =|3 ·  · 11 ·  · 37|||||
|_R_<sub>7</sub> =|·|||||
|_R_<sub>8</sub> =|11 ·  · 101 ·|||||
|_R_<sub>9</sub> =|3<sup>2</sup> · 37 ·|||||
|_R_<sub>10</sub> =|11 · 41 · 271 ·|}|{||_R_<sub>11</sub> =|·|
|_R_<sub>12</sub> =|3 · 7 · 11 · 13 · 37 · 101 ·|||||
|_R_<sub>13</sub> =|·  ·|||||
|_R_<sub>14</sub> =|11 · 239 · 4649 ·|||||
|_R_<sub>15</sub> =|3 ·  · 37 · 41 · 271 ·|||||
|_R_<sub>16</sub> =|11 ·  · 73 · 101 · 137 ·|||||
|_R_<sub>17</sub> =|·|||||
|_R_<sub>18</sub> =|3<sup>2</sup> · 7 · 11 · 13 ·  · 37 ·  · 333667|||||
|_R_<sub>19</sub> =||||||
|_R_<sub>20</sub> =|11 · 41 · 101 · 271 ·  · 9091 ·|}|{||_R_<sub>21</sub> =|3 · 37 ·  · 239 ·  · 4649 ·|
|_R_<sub>22</sub> =|11<sup>2</sup> ·  ·  ·  · 21649 · 513239|||||
|_R_<sub>29</sub>=||||||
|_R_<sub>24</sub> =|3 · 7 · 11 · 13 · 37 · 73 · 101 · 137 · 9901 ·|||||
|_R_<sub>25</sub> =|41 · 271 ·  ·  ·|||||
|_R_<sub>26</sub> =|11 · 53 · 79 ·  · 265371653 ·|||||
|_R_<sub>27</sub> =|3<sup>3</sup> · 37 ·  · 333667 ·|||||
|_R_<sub>28</sub> =|11 ·  · 101 · 239 ·  · 4649 · 909091 ·|||||
|_R_<sub>29</sub> =|·  ·  ·  ·|||||
|_R_<sub>30</sub> =|3 · 7 · 11 · 13 · 31 · 37 · 41 ·  ·  · 271 ·  · 9091 · 2906161|}||||

The smallest prime factors of _R_<sub>_n_</sub> 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, ...

## Related pages

- Repeating decimal
- Repdigit

## Other websites

- The main tables of the Cunningham project.
- Repunit at The Prime Pages by Chris Caldwell.
- Repunits and their prime factors at World!Of Numbers.
- Prime generalized repunits of at least 1000 decimal digits by Andy Steward
- Repunit Primes Project Giovanni Di Maria's repunit primes page.
- Smallest odd prime p such that (b^p-1)/(b-1) and (b^p+1)/(b+1) is prime for bases 2<=b<=1024
- Factorization of repunit numbers
- Generalized repunit primes in base -50 to 50