In recreational mathematics, a Keith number or repfigit number (short for repetitive Fibonacci-like digit) is a number in the following integer sequence:
Keith numbers were introduced by Mike Keith in 1987. They are computationally very challenging to find, with only about 100 known.
To determine whether an n-digit number N is a Keith number, create a Fibonacci-like sequence that starts with the n decimal digits of N, putting the most significant digit first. Then continue the sequence, where each subsequent term is the sum of the previous n terms. By definition, N is a Keith number if N appears in the sequence thus constructed.
As an example, consider the 3-digit number N = 197. The sequence goes like this:
Because 197 appears in the sequence, 197 is seen to be indeed a Keith number.
A Keith number is a positive integer N that appears as a term in a linear recurrence relation with initial terms based on its own decimal digits. Given an n-digit number
a sequence is formed with initial terms and with a general term produced as the sum of the previous n terms. If the number N appears in the sequence , then N is said to be a Keith number. One-digit numbers possess the Keith property trivially, and are usually excluded.