cp's OEIS Frontend

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.

Showing 1-8 of 8 results.

A007629 Repfigit (REPetitive FIbonacci-like diGIT) numbers (or Keith numbers).

Original entry on oeis.org

14, 19, 28, 47, 61, 75, 197, 742, 1104, 1537, 2208, 2580, 3684, 4788, 7385, 7647, 7909, 31331, 34285, 34348, 55604, 62662, 86935, 93993, 120284, 129106, 147640, 156146, 174680, 183186, 298320, 355419, 694280, 925993, 1084051, 7913837, 11436171, 33445755, 44121607
Offset: 1

Views

Author

Keywords

Comments

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.
Called Sep-Numbers by Baumann (2004). - N. J. A. Sloane, Mar 02 2014
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

Examples

			197 is a term since sequence {b(i)} (see Comments) is A186830 = { 1, 9, 7, 17, 33, 57, 107, 197, ... }, which contains 197.
		

References

  • Charles Ashbacher, J. Rec. Math., Vol. 21, No. 4 (1989), p. 310.
  • Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 197, p. 59, Ellipses, Paris 2008.
  • Mike Keith, Repfigit Numbers, J. Recreational Math., Vol. 19, No. 2 (1987), pp. 41-42.
  • Clifford A. Pickover, All Known Replicating Fibonacci Digits Less Than One Billion, J. Recreational Math., Vol. 22, No. 3, p. 176, 1990.
  • Clifford A. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 229.
  • Clifford A. Pickover, Wonders of Numbers, "Looping Replicating Fibonacci digits", pp. 174-5, OUP 2000.
  • K. Sherriff, Computing Replicating Fibonacci Digits, J. Recreational Math., Vol. 26, No. 3, p. 191, 1994.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, see p. 71.

Crossrefs

Cf. A006576, A048970, A050235, A186830. See A130010 for another version.
Cf. A162724, A187713, A188195-A188200 (base 2, 5, 3-4, 6-9).
Cf. A188380 (balanced ternary), A188381 (base -2).
Cf. A188201 (least base-n Keith number >= n).
Cf. A274769, A274770, A281915, A281916, A281917, A281918, A281919, A281920, A281921 (starting with n^k, 2<=k<=10).

Programs

  • Haskell
    import Data.Char (digitToInt)
    a007629 n = a007629_list !! (n-1)
    a007629_list = filter isKeith [10..] where
       isKeith n = repfigit $ reverse $ map digitToInt $ show n where
          repfigit ns = s == n || s < n && (repfigit $ s : init ns) where
             s = sum ns
    -- Reinhard Zumkeller, Nov 04 2010, Mar 31 2011
    
  • Maple
    isA007629 := proc(n)
        local L,t,a ;
        if n < 10 then
            return false;
        end if;
        L := ListTools[Reverse](convert(n,base,10)) ;
        t :=  nops(L) ;
        while true do
            a := add(op(-i,L),i=1..t) ;
            L := [op(L),a] ;
            if a > n then
                return false;
            elif a = n then
                return true;
            end if;
        end do:
    end proc:
    for n from 1 do
        if isA007629(n) then
            printf("%d,\n",n);
        end if;
    end do: # R. J. Mathar, Jan 12 2016
  • Mathematica
    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 *)
    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 *)
    keithQ[n_, e_] := Last[NestWhile[Rest[Append[#, Apply[Plus, #]]]&, IntegerDigits[n^e], Last[#]9
    a007629[n_] := Select[Range[10, n], keithQ[#, 1]&]
    a007629[45*10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)
  • PARI
    is(n)=if(n<14,return(0));my(v=digits(n),t=#v);while(v[#v]Charles R Greathouse IV, Feb 01 2013
    
  • Python
    A007629_list = []
    for n in range(10,10**9):
        x = [int(d) for d in str(n)]
        y = sum(x)
        while y < n:
            x, y = x[1:]+[y], 2*y-x[0]
        if y == n:
            A007629_list.append(n) # Chai Wah Wu, Sep 12 2014

Extensions

12th term corrected from 2508 to 2580, Aug 15 1997
More terms from Mike Keith, Feb 15 1999
Keith's old links fixed and C. Ashbacher's name added by Christopher Carl Heckman, Nov 18 2010

A188200 Base-9 Keith numbers.

Original entry on oeis.org

17, 21, 25, 42, 67, 81, 96, 101, 149, 162, 173, 202, 243, 303, 324, 346, 404, 405, 486, 519, 567, 648, 692, 732, 857, 1189, 1464, 2199, 4398, 11644, 18325, 33774, 34453, 37999, 70348, 92664, 141557, 256820, 263412, 326778, 349484, 526824, 535754, 579708, 1461987, 1519308, 1621052, 2688905, 4650964, 8027458, 8198651, 8374956, 13504910, 17858551, 20002383, 55640285, 154513633, 170801638
Offset: 1

Views

Author

T. D. Noe, Mar 24 2011

Keywords

Comments

Keith numbers are described in A007629. Base 9 appears to be unusually rich in Keith numbers. Why?

Examples

			101 is here because, in base 9, 101 is 122 and applying the Keith iteration to this number produces the numbers 1, 2, 2, 5, 9, 16, 30, 55, 101. Note that the multiples 202, 303, and 404 are here also.
		

Crossrefs

Cf. A007629 (base 10), A162724 (base 2), A187713 (base 5), A188195-A188199.

Programs

  • Mathematica
    IsKeith[n_,b_] := Module[{d, s, k}, d = IntegerDigits[n, b]; s = Total[d]; k = 1; While[AppendTo[d, s]; s = 2 s - d[[k]]; s < n, k++]; s == n]; Select[Range[3,10^5], IsKeith[#,9]&]

A188201 The least base-n Keith number >= n.

Original entry on oeis.org

2, 3, 5, 5, 8, 8, 8, 17, 14, 13, 13, 13, 20, 18, 23, 33, 26, 21, 21, 21, 32, 28, 35, 49, 29, 33, 41, 57, 44, 38, 34, 34, 34, 43, 53, 73, 56, 48, 45, 81, 62, 53, 47, 89, 68, 53, 71, 97, 74, 63, 77, 55, 55, 55, 60, 113, 86, 73, 89, 69, 92, 78, 95, 129, 98, 83, 73, 137, 104, 88
Offset: 2

Views

Author

T. D. Noe, Mar 24 2011

Keywords

Comments

Keith numbers are described in A007629. It appears that a(n) < 2n. If n or n+1 is a Fibonacci number f, then a(n) = f. If n>3 and n+2 is a Fibonacci number f, then a(n) = f. The graph shows that 2n-1, 3n/2-1, and 8(n-5)/7+5 are frequent values of a(n).

Crossrefs

Cf. A007629 (base 10), A162724 (base 2), A187713 (base 5), A188195-A188200.

Programs

  • Mathematica
    IsKeith[n_,b_] := Module[{d, s, k}, d = IntegerDigits[n, b]; s = Total[d]; k = 1; While[AppendTo[d, s]; s = 2 s - d[[k]]; s < n, k++]; s == n]; Table[k = n; While[! IsKeith[k, n], k++]; k, {n, 2, 100}]

A188196 Base-4 Keith numbers.

Original entry on oeis.org

5, 7, 10, 15, 18, 29, 47, 113, 163, 269, 1150, 1293, 1881, 22173, 44563, 95683, 261955, 1179415, 1295936, 11451171, 26867679, 42531919, 247791599, 429914163, 445379527, 560533869, 619222313, 2147478019, 2971786617, 3474640372
Offset: 1

Views

Author

T. D. Noe, Mar 24 2011

Keywords

Comments

Keith numbers are described in A007629.

Examples

			47 is here because, in base 4, 47 is 233 and applying the Keith iteration to this number produces the numbers 2, 3, 3, 8, 14, 25, 47.
		

Crossrefs

Cf. A007629 (base 10), A162724 (base 2), A187713 (base 5), A188195-A188200.

Programs

  • Mathematica
    IsKeith[n_,b_] := Module[{d, s, k}, d = IntegerDigits[n, b]; s = Total[d]; k = 1; While[AppendTo[d, s]; s = 2 s - d[[k]]; s < n, k++]; s == n]; Select[Range[3,10^5], IsKeith[#,4]&]

A188199 Base-8 Keith numbers.

Original entry on oeis.org

8, 11, 15, 16, 22, 24, 32, 37, 40, 48, 56, 59, 92, 123, 200, 251, 257, 400, 457, 893, 2761, 4040, 4547, 8392, 9161, 12833, 16784, 21225, 29617, 127126, 238244, 378733, 526117, 587524, 599333, 672549, 745765, 2176234, 2347267, 2593739, 5285583, 8113400, 341785390, 449415500, 514971408
Offset: 1

Views

Author

T. D. Noe, Mar 24 2011

Keywords

Comments

Keith numbers are described in A007629.

Examples

			200 is here because, in base 8, 200 is 310 and applying the Keith iteration to this number produces the numbers 3, 1, 0, 4, 5, 9, 18, 32, 59, 109, 200.
		

Crossrefs

Cf. A007629 (base 10), A162724 (base 2), A187713 (base 5), A188195-A188200.

Programs

  • Mathematica
    IsKeith[n_,b_] := Module[{d, s, k}, d = IntegerDigits[n, b]; s = Total[d]; k = 1; While[AppendTo[d, s]; s = 2 s - d[[k]]; s < n, k++]; s == n]; Select[Range[3,10^5], IsKeith[#,8]&]

A188380 Balanced ternary Keith numbers.

Original entry on oeis.org

3, 49, 73, 88, 97, 198, 840, 1479, 2425, 5277, 18799
Offset: 1

Views

Author

Alonso del Arte, Mar 29 2011

Keywords

Comments

Only terms in common with base 3 Keith numbers (A188195) for the range examined are 3 and 840.
If the sum of balanced ternary digits of a positive number is 0 or less, then the recurrence from the digits soon becomes consistently negative and the number in question is not a Keith number in balanced ternary.

Examples

			The number 49 in balanced ternary is {1, -1, -1, 1, 1}. The pentanacci-like sequence continues 1, 1, 3, 7, 13, 25, 49, thus 49 is a Keith number in balanced ternary.
		

Programs

  • Mathematica
    (* First run program at A065363 to define balTernDigits *) keithFromListQ[n_Integer, digits_List] := Module[{seq = digits, curr = digits[[-1]], ord = Length[digits]}, While[curr < n, curr = Plus@@Take[seq, -ord]; AppendTo[seq, curr]]; Return[seq[[-1]] == n]]; Select[Range[3, 19683], Plus@@balTernDigits[#] > 0 && keithFromListQ[#, balTernDigits[#]] &]

A188197 Base-6 Keith numbers.

Original entry on oeis.org

8, 11, 16, 27, 37, 44, 74, 88, 111, 148, 185, 409, 526, 2417, 8720, 12154, 15268, 49322, 61587, 68444, 82833, 98644, 206356, 249549, 327001, 484512, 642437, 692928, 695659, 726975, 964225, 1210087, 2141228, 2282504, 5514048, 10640601, 48453362, 69572128, 74343984, 171550728, 184847569, 204545417, 232877871, 245317977, 246133682
Offset: 1

Views

Author

T. D. Noe, Mar 24 2011

Keywords

Comments

Keith numbers are described in A007629.

Examples

			44 is here because, in base 6, 44 is 112 and applying the Keith iteration to this number produces the numbers 1, 1, 2, 4, 7, 13, 24, 44.
		

Crossrefs

Cf. A007629 (base 10), A162724 (base 2), A187713 (base 5), A188195-A188200.

Programs

  • Mathematica
    IsKeith[n_,b_] := Module[{d, s, k}, d = IntegerDigits[n, b]; s = Total[d]; k = 1; While[AppendTo[d, s]; s = 2 s - d[[k]]; s < n, k++]; s == n]; Select[Range[3,10^5], IsKeith[#,6]&]

A188198 Base-7 Keith numbers.

Original entry on oeis.org

8, 13, 16, 19, 24, 32, 40, 48, 57, 114, 125, 145, 171, 228, 285, 329, 342, 589, 1969, 2833, 4938, 30318, 43153, 168516, 336774, 375008, 652933, 1068018, 2955098, 5658387, 11096232, 19623430, 26245925, 81805113, 112442958, 119572340, 130712398, 407198006, 494835656, 508871625, 564319261, 712864110
Offset: 1

Views

Author

T. D. Noe, Mar 24 2011

Keywords

Comments

Keith numbers are described in A007629.

Examples

			48 is here because, in base 7, 48 is 66 and applying the Keith iteration to this number produces the numbers 6, 6, 12, 18, 30, 48.
		

Crossrefs

Cf. A007629 (base 10), A162724 (base 2), A187713 (base 5), A188195-A188200.

Programs

  • Mathematica
    IsKeith[n_,b_] := Module[{d, s, k}, d = IntegerDigits[n, b]; s = Total[d]; k = 1; While[AppendTo[d, s]; s = 2 s - d[[k]]; s < n, k++]; s == n]; Select[Range[3,10^5], IsKeith[#,7]&]
Showing 1-8 of 8 results.