In recreational mathematics, a Keith number or repfigit number (short for repetitive Fibonacci-like digit) is a natural number n {\displaystyle n} in a given number base b {\displaystyle b} with k {\displaystyle k} digits such that when a sequence is created such that the first k {\displaystyle k} terms are the k {\displaystyle k} digits of n {\displaystyle n} and each subsequent term is the sum of the previous k {\displaystyle k} terms, n {\displaystyle n} is part of the sequence. Keith numbers were introduced by Mike Keith in 1987. They are computationally very challenging to find, with only about 125 known.
Definition Let n {\displaystyle n} be a natural number, let k = ⌊ log b n ⌋ + 1 {\displaystyle k=\lfloor \log _{b}{n}\rfloor +1} be the number of digits of n {\displaystyle n} in base b {\displaystyle b} , and let
d i = n mod b i + 1 − n mod b i b i {\displaystyle d_{i}={\frac {n{\bmod {b}}^{i+1}-n{\bmod {b}}^{i}}{b^{i}}}}
be the value of each digit of n {\displaystyle n} . We define the sequence S ( i ) {\displaystyle S(i)} by a linear recurrence relation. For 0 ≤ i < k {\displaystyle 0\leq i<k} ,
S ( i ) = d k − i − 1 {\displaystyle S(i)=d_{k-i-1}}
and for i ≥ k {\displaystyle i\geq k}
S ( i ) = ∑ j = 0 k S ( i − k + j ) {\displaystyle S(i)=\sum _{j=0}^{k}S(i-k+j)}
If there exists an i {\displaystyle i} such that S ( i ) = n {\displaystyle S(i)=n} , then n {\displaystyle n} is said to be a Keith number. For example, 88 is a Keith number in base 6, as
S ( 0 ) = d 3 − 0 − 1 = d 2 = 88 mod 6 2 + 1 − 88 mod 6 2 6 2 = 88 mod 2 16 − 88 mod 3 6 36 = 88 − 16 36 = 72 36 = 2 {\displaystyle S(0)=d_{3-0-1}=d_{2}={\frac {88{\bmod {6}}^{2+1}-88{\bmod {6}}^{2}}{6^{2}}}={\frac {88{\bmod {2}}16-88{\bmod {3}}6}{36}}={\frac {88-16}{36}}={\frac {72}{36}}=2}
… excerpt ends here. Continue reading the full article.
