This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A007629 M4922 #104 May 21 2025 18:56:09 %S A007629 14,19,28,47,61,75,197,742,1104,1537,2208,2580,3684,4788,7385,7647, %T A007629 7909,31331,34285,34348,55604,62662,86935,93993,120284,129106,147640, %U A007629 156146,174680,183186,298320,355419,694280,925993,1084051,7913837,11436171,33445755,44121607 %N A007629 Repfigit (REPetitive FIbonacci-like diGIT) numbers (or Keith numbers). %C A007629 Numbers k > 9 with following property: form a sequence {b(i)} whose initial terms are the t digits of k, later terms given by rule that b(i) = sum of t previous terms; then k itself appears in the sequence. %C A007629 Called Sep-Numbers by Baumann (2004). - _N. J. A. Sloane_, Mar 02 2014 %C A007629 Sometimes named after the American mathematician, software engineer and author Mike Keith (b. 1955), who introduced them in 1987 as "repfigit numbers". - _Amiram Eldar_, Jun 27 2021 %D A007629 Charles Ashbacher, J. Rec. Math., Vol. 21, No. 4 (1989), p. 310. %D A007629 Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 197, p. 59, Ellipses, Paris 2008. %D A007629 Mike Keith, Repfigit Numbers, J. Recreational Math., Vol. 19, No. 2 (1987), pp. 41-42. %D A007629 Clifford A. Pickover, All Known Replicating Fibonacci Digits Less Than One Billion, J. Recreational Math., Vol. 22, No. 3, p. 176, 1990. %D A007629 Clifford A. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 229. %D A007629 Clifford A. Pickover, Wonders of Numbers, "Looping Replicating Fibonacci digits", pp. 174-5, OUP 2000. %D A007629 K. Sherriff, Computing Replicating Fibonacci Digits, J. Recreational Math., Vol. 26, No. 3, p. 191, 1994. %D A007629 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A007629 David Wells, The Penguin Dictionary of Curious and Interesting Numbers, see p. 71. %H A007629 N. J. A. Sloane, <a href="/A007629/b007629.txt">Table of n, a(n) for n = 1..94</a> [Taken from first Keith link below.] %H A007629 Rüdeger Baumann, <a href="http://www.austromath.at/dug/dnl53.pdf">Sep-Zahlen or Sep-Numbers</a>, DERIVE Newsletter, #53 (2004), p. 33. %H A007629 Jhon J. Bravo, Sergio Guzmán, and Florian Luca, <a href="http://dx.doi.org/10.1007/s10986-013-9199-3">Repdigit Keith numbers</a>, Lithuanian Mathematical Journal, Vol. 53, No. 2 (April 2013), pp. 143-148. %H A007629 Edmund Copeland and Brady Haran, <a href="https://www.youtube.com/watch?v=uuMwz47LV_w">Keith Numbers</a>, Numberphile video (2012). %H A007629 Mike Keith, <a href="http://www.cadaeic.net/keithnum.htm">Keith numbers</a>. %H A007629 Mike Keith, <a href="http://web.archive.org/web/20070208082537/http://users.aol.com/s6sj7gt/keithnum.htm">Determination of All Keith Numbers Up to 10^19</a>. %H A007629 Mike Keith, <a href="/A007629/a007629.pdf">Power-sum numbers</a>, J. Recreational Mathematics, Vol. 18, No. 4 (1986), pp. 275-278. (Annotated scanned copy) %H A007629 Martin Klazar and Florian Luca, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL10/Klazar/klazar15.html">Counting Keith numbers</a>, Journal of Integer Sequences, Vol. 10 (2007), Article 07.2.2. %H A007629 Madras Math's Amazing Number Facts, <a href="http://www.madras.fife.sch.uk/maths/amazingnofacts/fact049.html">Repfigits</a>. %H A007629 Clifford A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," <a href="http://www.zentralblatt-math.org/zmath/en/search/?q=an:0983.00008&format=complete">Zentralblatt review</a>. %H A007629 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KeithNumber.html">Keith Number</a>. %H A007629 Wikipedia, <a href="http://en.wikipedia.org/wiki/Keith_number">Keith number</a>. %e A007629 197 is a term since sequence {b(i)} (see Comments) is A186830 = { 1, 9, 7, 17, 33, 57, 107, 197, ... }, which contains 197. %p A007629 isA007629 := proc(n) %p A007629 local L,t,a ; %p A007629 if n < 10 then %p A007629 return false; %p A007629 end if; %p A007629 L := ListTools[Reverse](convert(n,base,10)) ; %p A007629 t := nops(L) ; %p A007629 while true do %p A007629 a := add(op(-i,L),i=1..t) ; %p A007629 L := [op(L),a] ; %p A007629 if a > n then %p A007629 return false; %p A007629 elif a = n then %p A007629 return true; %p A007629 end if; %p A007629 end do: %p A007629 end proc: %p A007629 for n from 1 do %p A007629 if isA007629(n) then %p A007629 printf("%d,\n",n); %p A007629 end if; %p A007629 end do: # _R. J. Mathar_, Jan 12 2016 %t A007629 keithQ[n_Integer] := Module[{b = IntegerDigits[n], s, k = 0}, s = Total[b]; While[s < n, AppendTo[b, s]; k++; s = 2*s - b[[k]]]; s == n]; Select[Range[10, 100000], keithQ] (* _T. D. Noe_, Mar 15 2011 *) %t A007629 nxt[n_]:=Rest[Flatten[Join[{n,Total[n]}]]]; repfigitQ[m_]:=MemberQ[ NestWhileList[ nxt,IntegerDigits[m],Max[#]<=m&][[All,-1]],m]; Select[ Range[10,45*10^6],repfigitQ] (* _Harvey P. Dale_, Sep 02 2016 *) %t A007629 keithQ[n_, e_] := Last[NestWhile[Rest[Append[#, Apply[Plus, #]]]&, IntegerDigits[n^e], Last[#]<n&]]==n/;n>9 %t A007629 a007629[n_] := Select[Range[10, n], keithQ[#, 1]&] %t A007629 a007629[45*10^6] (* _Hartmut F. W. Hoft_, Jun 02 2021 *) %o A007629 (Haskell) %o A007629 import Data.Char (digitToInt) %o A007629 a007629 n = a007629_list !! (n-1) %o A007629 a007629_list = filter isKeith [10..] where %o A007629 isKeith n = repfigit $ reverse $ map digitToInt $ show n where %o A007629 repfigit ns = s == n || s < n && (repfigit $ s : init ns) where %o A007629 s = sum ns %o A007629 -- _Reinhard Zumkeller_, Nov 04 2010, Mar 31 2011 %o A007629 (PARI) is(n)=if(n<14,return(0));my(v=digits(n),t=#v);while(v[#v]<n,v=concat(v,sum(i=0,t-1,v[#v-i]))); v[#v]==n \\ _Charles R Greathouse IV_, Feb 01 2013 %o A007629 (Python) %o A007629 A007629_list = [] %o A007629 for n in range(10,10**9): %o A007629 x = [int(d) for d in str(n)] %o A007629 y = sum(x) %o A007629 while y < n: %o A007629 x, y = x[1:]+[y], 2*y-x[0] %o A007629 if y == n: %o A007629 A007629_list.append(n) # _Chai Wah Wu_, Sep 12 2014 %Y A007629 Cf. A006576, A048970, A050235, A186830. See A130010 for another version. %Y A007629 Cf. A162724, A187713, A188195-A188200 (base 2, 5, 3-4, 6-9). %Y A007629 Cf. A188380 (balanced ternary), A188381 (base -2). %Y A007629 Cf. A188201 (least base-n Keith number >= n). %Y A007629 Cf. A274769, A274770, A281915, A281916, A281917, A281918, A281919, A281920, A281921 (starting with n^k, 2<=k<=10). %K A007629 nonn,base,nice %O A007629 1,1 %A A007629 _N. J. A. Sloane_, _Mira Bernstein_, _Robert G. Wilson v_ %E A007629 12th term corrected from 2508 to 2580, Aug 15 1997 %E A007629 More terms from _Mike Keith_, Feb 15 1999 %E A007629 Keith's old links fixed and C. Ashbacher's name added by _Christopher Carl Heckman_, Nov 18 2010