Repunit — Definition, Formula & Example
A repunit is a positive whole number written using only the digit 1, such as 1, 11, 111, or 1111. The name is short for "repeated unit."
For a natural number , the th repunit is the number whose base-10 representation consists of exactly ones. Equivalently, .
Key Formula
Where:
- = The repunit with n digits, all equal to 1
- = The number of ones (digits) in the repunit, a natural number
Worked Example
Problem: Use the formula to find the repunit . Then show that it is composite by using the fact that 6 = 2 × 3.
Step 1: Substitute n = 6 into the formula. The number is six nines, and dividing by 9 leaves six ones.
Step 2: Because 6 is divisible by both 2 and 3, is divisible by the repunits and . Check both divisions.
Step 3: Combine these results into the full prime factorization. You can multiply the factors to confirm the product.
Answer: . It is composite because it equals . In general, whenever divides , the repunit divides .
Why It Matters
Repunits are a good testing ground for divisibility rules. The digit sum of is , so is divisible by 3 exactly when is a multiple of 3. Repunit primes are rare and are the target of computer searches in number theory. Only a handful are known, starting with , , and .
Common Mistakes
Mistake: Assuming a repunit is prime whenever its number of digits is prime.
Correction: A prime number of digits is necessary for a repunit prime, but it is not enough. For example, and are both composite.
