Mathwords logoMathwords

Repdigit — Definition, Formula & Example

A repdigit is a positive whole number made of one digit repeated, such as 22, 555, or 8888. The name is short for "repeated digit."

A repdigit (in base 10) is a natural number of the form d⋅10n−19d \cdot \dfrac{10^n - 1}{9}, where d∈{1,2,…,9}d \in \{1, 2, \ldots, 9\} and n≥1n \ge 1. Its decimal representation is the digit dd written nn times. The one-digit numbers 1 through 9 are trivial repdigits, and some sources require n≥2n \ge 2. The special case d=1d = 1 gives the repunits 1, 11, 111, and so on.

Key Formula

R=d⋅10n−19R = d \cdot \frac{10^n - 1}{9}
Where:
  • RR = the repdigit
  • dd = the repeated digit, a whole number from 1 to 9
  • nn = the number of times the digit appears (the length of the number)

Worked Example

Problem: Build the three-digit repdigit with digit 5 from the formula. Then show that it is divisible by 37.
Step 1: Substitute d=5d = 5 and n=3n = 3 into the formula. The fraction 103−19\frac{10^3 - 1}{9} is the repunit 111.
R=5⋅103−19=5⋅9999=5⋅111=555R = 5 \cdot \frac{10^3 - 1}{9} = 5 \cdot \frac{999}{9} = 5 \cdot 111 = 555
Step 2: Factor the repunit 111, then substitute that factorization back into the product.
555=5⋅111=5⋅3⋅37=15⋅37555 = 5 \cdot 111 = 5 \cdot 3 \cdot 37 = 15 \cdot 37
Step 3: Because 37 is a factor, dividing leaves no remainder. The same reasoning works for every three-digit repdigit, since each one equals d⋅111d \cdot 111.
555÷37=15555 \div 37 = 15
Answer: The formula gives 555, and 555 = 15 × 37, so 555 is divisible by 37. In fact, every three-digit repdigit (111, 222, …, 999) is a multiple of 37.

Why It Matters

Writing a repdigit as dd times a repunit is a standard trick in competition problems such as MATHCOUNTS and AMC 8. It explains surprising facts like 12345679×9=11111111112345679 \times 9 = 111111111. The same factorization shows that any repdigit with at least two digits and a digit from 2 to 9 is composite, because dd and the repunit are both factors greater than 1.

Common Mistakes

Mistake: Calling a number like 1212 or 4545 a repdigit because it has a repeating pattern.
Correction: A repdigit repeats a single digit, so every digit must be identical. The number 1212 repeats the two-digit block 12, and 1212=12×1011212 = 12 \times 101. It is not a repdigit.

Related Terms

  • Digit — The single symbol a repdigit repeats throughout
  • Natural Numbers — The set from which all repdigits are drawn
  • Composite Number — Describes every multi-digit repdigit whose digit is 2 through 9
  • Even Number — A repdigit is even exactly when its digit is even
  • Integers — Repdigits form a special subset of the positive integers
  • Repunit — Special repdigit made only of the digit 1