Home

repunits

Repunits are positive integers that consist entirely of the digit 1 in a given base. The most familiar case is base 10, where the n-digit repunit is denoted R_n and equals 111...1 with n ones. In closed form, R_n(b) = (b^n - 1)/(b - 1) = 1 + b + b^2 + ... + b^{n-1}, where b is the base.

General properties: For any base b ≥ 2, if n is composite then R_n(b) is composite. If n

Special cases: In base 2, R_n(2) = 2^n - 1, the Mersenne numbers; many of these are prime

Connections and applications: Repunits relate to cyclotomic factorization, since 10^n − 1 factors into a product involving

=
d·k
with
d
>
1,
then
R_n(b)
=
R_d(b)
×
(1
+
b^d
+
b^{2d}
+
...
+
b^{(k-1)d}).
Therefore,
a
necessary
condition
for
R_n(b)
to
be
prime
is
that
n
is
prime.
A
repunit
prime
in
base
b
is
a
prime
of
the
form
(b^n
-
1)/(b
-
1)
with
n
>
1.
for
certain
prime
n
(Mersenne
primes).
In
base
10,
the
first
few
repunits
are
11,
111,
1111,
11111,
111111,
and
so
on.
Among
these,
11
is
prime
while
111
=
3
×
37,
1111
=
11
×
101,
11111
=
41
×
271,
and
111111
=
3
×
7
×
11
×
13
×
37.
repunits.
The
study
of
repunit
primes
is
a
topic
in
primality
testing
and
computational
number
theory,
with
repunit
primes
known
only
for
certain
large
n
values
in
various
bases.