Repfigit Number — Definition, Formula & Example
A repfigit number is a whole number with at least two digits that shows up again in a Fibonacci-like sequence that starts with its own digits. The name is short for "repetitive Fibonacci-like digit," and these numbers are also called Keith numbers.
Let be a natural number with digits in base 10. Define a sequence by for , and for let each term be the sum of the terms before it. Then is a repfigit (Keith) number if for some index .
Key Formula
Where:
- = The number being tested, with at least two digits
- = The number of digits in N, which is also how many previous terms you add
- = The k-th digit of N, read from left to right
- = The k-th term of the sequence; N is a repfigit if some term equals N
Worked Example
Problem: Is 197 a repfigit number?
Step 1: Count the digits. 197 has 3 digits, so each new term is the sum of the previous 3 terms. Start the sequence with the digits 1, 9, 7.
Step 2: Build new terms by adding the last three terms each time.
Step 3: Add the last three terms once more. The result is 197, the number you started with, so you can stop.
Answer: Yes. The sequence 1, 9, 7, 17, 33, 57, 107, 197 reaches 197, so 197 is a repfigit number.
Why It Matters
Repfigits appear in number-puzzle collections and in math competitions as exercises in following a recursive rule exactly. The only two-digit repfigits are 14, 19, 28, 47, 61, and 75, and the next one after those is 197. They also make good first coding projects, because a short loop can test every number up to a million. Mathematicians still do not know whether infinitely many repfigits exist.
Common Mistakes
Mistake: Always adding just the previous two terms, as in the Fibonacci sequence, no matter how many digits the number has.
Correction: The number of terms you add must match the number of digits. For 197, adding only two terms gives 1, 9, 7, 16, 23, 39, 62, 101, 163, 264. That sequence skips past 197 and leads to the wrong conclusion. Add three terms for a three-digit number, four terms for a four-digit number, and so on.
