# Repdigit

In number theory, a repdigit or sometimes monodigit[1] is a natural number composed of repeated instances of the same digit in a positional number system (often implicitly decimal). The word is a portmanteau of repeated and digit.

Examples are 11, 666, 4444, and 999999. All repdigits are palindromic numbers and are multiples of repunits. Two of the most famous repdigits are 666, referred to in Christian Eschatology as the number of the beast, and 777, which is sometimes considered a "lucky number" as it is used on most slot machines to identify a jackpot. Other well-known repdigits include the repunit primes and in particular the Mersenne primes (which are repdigits when represented in binary).

Repdigits are the representation in base ${\displaystyle B}$ of the number ${\displaystyle x{\frac {B^{y}-1}{B-1}}}$ where ${\displaystyle 0 is the repeated digit and ${\displaystyle 1 is the number of repetitions. For example, the repdigit 77777 in base 10 is ${\displaystyle 7\times {\frac {10^{5}-1}{10-1}}}$.