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

A281915 4th power analog of Keith numbers.

Original entry on oeis.org

1, 7, 19, 20, 22, 25, 28, 36, 77, 107, 110, 175, 789, 1528, 1932, 3778, 5200, 7043, 8077, 38855, 41234, 44884, 49468, 204386, 763283, 9423515, 73628992, 87146144, 146124072, 146293356, 326194628, 1262293219, 1321594778, 2767787511, 11511913540, 12481298961, 13639550655
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^4 digits to reach n.
Consider the digits of n^4. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			175^4 = 937890625:
9 + 3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 = 49;
3 + 7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 = 89;
7 + 8 + 9 + 0 + 6 + 2 + 5 + 49 + 89 = 175.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281915[n_] := Join[{1, 7}, Select[Range[10, n], keithQ[#, 4]&]]
    a281915[10^6] (* Hartmut F. W. Hoft, Jun 02 2021 *)

Extensions

a(27)-a(28) from Jinyuan Wang, Jan 30 2020
Missing a(25) and a(29)-a(37) from Giovanni Resta, Jan 31 2020

A281916 5th power analog of Keith numbers.

Original entry on oeis.org

1, 28, 35, 36, 46, 51, 99, 109, 191, 239, 476, 491, 1022, 1126, 1358, 1362, 15156, 21581, 44270, 63377, 100164, 375830, 388148, 2749998, 5215505, 10158487, 81082532, 87643314, 410989134, 1485204944, 3496111364, 3829840893, 15889549579, 16107462404, 16766005098, 17608009898
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^5 digits to reach n.
Consider the digits of n^5. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			109^5 = 15386239549:
1 + 5 + 3 + 8 + 6 + 2 + 3 + 9 + 5 + 4 + 9 = 55;
5 + 3 + 8 + 6 + 2 + 3 + 9 + 5 + 4 + 9 + 55 = 109.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281916[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 5]&]]
    a281916[5*10^5] (* Hartmut F. W. Hoft, Jun 03 2021 *)

Extensions

a(27)-a(28) from Jinyuan Wang, Jan 31 2020
a(29)-a(36) from Giovanni Resta, Jan 31 2020

A281918 7th power analog of Keith numbers.

Original entry on oeis.org

1, 18, 27, 31, 34, 43, 53, 58, 68, 145, 187, 314, 826, 2975, 37164, 40853, 58530, 72795, 77058, 160703, 187617, 1926759, 6291322, 6628695, 25285305, 31292514, 33968486, 54954185, 71593237, 125921697, 555963577, 575307142, 2393596216, 2444508547, 42544333760, 97812197525
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^7 digits to reach n.
Consider the digits of n^7. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.
a(30) > 10^8. - Jinyuan Wang, Jan 30 2020

Examples

			145^7 = 1347646586640625:
1 + 3 + 4 + 7 + 6 + 4 + 6 + 5 + 8 + 6 + 6 + 4 + 0 + 6 + 2 + 5 = 73;
3 + 4 + 7 + 6 + 4 + 6 + 5 + 8 + 6 + 6 + 4 + 0 + 6 + 2 + 5 + 73 = 145.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281918[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 7]&]]
    a281918[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)

Extensions

a(28)-a(29) from Jinyuan Wang, Jan 30 2020
a(30)-a(36) from Giovanni Resta, Feb 03 2020

A281919 8th-power analog of Keith numbers.

Original entry on oeis.org

1, 30, 46, 54, 63, 207, 394, 693, 694, 718, 20196, 42664, 80051, 90135, 91447, 93136, 207846, 324121, 361401, 421609, 797607, 802702, 882227, 1531788, 1788757, 1789643, 4028916, 4176711, 6692664, 15643794, 31794346, 65335545, 140005632, 144311385, 153364253
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^8 digits to reach n.
Consider the digits of n^8. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281919[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 8]&]]
    a281919[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)

Formula

207^8 = 3371031134626313601:
3 + 3 + 7 + 1 + 0 + 3 + 1 + 1 + 3 + 4 + 6 + 2 + 6 + 3 + 1 + 3 + 6 + 0 + 1 = 54;
3 + 7 + 1 + 0 + 3 + 1 + 1 + 3 + 4 + 6 + 2 + 6 + 3 + 1 + 3 + 6 + 0 + 1 + 54 = 105;
7 + 1 + 0 + 3 + 1 + 1 + 3 + 4 + 6 + 2 + 6 + 3 + 1 + 3 + 6 + 0 + 1 + 54 + 105 = 207.

Extensions

a(32) from Jinyuan Wang, Feb 01 2020
Terms a(33) and beyond from Giovanni Resta, Feb 03 2020

A281920 9th-power analog of Keith numbers.

Original entry on oeis.org

1, 54, 71, 81, 196, 424, 451, 2394, 9057, 51737, 52141, 104439, 227914, 228088, 1019555, 1096369, 1202713, 1687563, 1954556, 3332130, 3652731, 4177592, 31669012, 79937731, 81478913, 148341053, 168763202, 182573136, 342393476, 773367191, 1450679282, 2914657310, 3282344153
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^9 digits to reach n.
Consider the digits of n^9. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			196^9 = 426878854210636742656:
4 + 2 + 6 + 8 + 7 + 8 + 8 + 5 + 4 + 2 + 1 + 0 + 6 + 3 + 6 + 7 + 4 + 2 + 6 + 5 + 6 = 100;
2 + 6 + 8 + 7 + 8 + 8 + 5 + 4 + 2 + 1 + 0 + 6 + 3 + 6 + 7 + 4 + 2 + 6 + 5 + 6 + 100 = 196.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281920[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 9]&]]
    a281920[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)

Extensions

a(24) from Jinyuan Wang, Feb 02 2020
a(25)-a(33) from Giovanni Resta, Feb 03 2020

A281921 10th-power analog of Keith numbers.

Original entry on oeis.org

1, 82, 85, 94, 97, 106, 117, 459, 1197, 24615, 24657, 26184, 87664, 117099, 538168, 1049708, 1229174, 2210323, 4587773, 11019224, 96167938, 104719358, 202511251, 226456915, 821871524, 1811437987, 1832881095, 3530066559, 7414362499, 7906250753, 15607432165, 15631766564
Offset: 1

Views

Author

Paolo P. Lava, Feb 02 2017

Keywords

Comments

Like Keith numbers but starting from n^10 digits to reach n.
Consider the digits of n^10. Take their sum and repeat the process deleting the first addend and adding the previous sum. The sequence lists the numbers that after some number of iterations reach a sum equal to n.

Examples

			106^10 = 179084769654285362176: 1 + 7 + 9 + 0 + 8 + 4 + 7 + 6 + 9 + 6 + 5 + 4 + 2 + 8 + 5 + 3 + 6 + 2 + 1 + 7 + 6 = 106.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, t, v; global n; v:=array(1..h);
    for n from 1 to q do b:=n^w; a:=[];
    for k from 1 to ilog10(b)+1 do a:=[(b mod 10), op(a)]; b:=trunc(b/10); od;
    for k from 1 to nops(a) do v[k]:=a[k]; od; b:=ilog10(n^w)+1;
    t:=nops(a)+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    (* function keithQ[ ] is defined in A007629 *)
    a281921[n_] := Join[{1}, Select[Range[10, n], keithQ[#, 10]&]]
    a281921[10^6] (* Hartmut F. W. Hoft, Jun 03 2021 *)

Extensions

a(21) from Jinyuan Wang, Feb 02 2020
a(22)-a(32) from Giovanni Resta, Feb 03 2020

A346067 Smallest prime that is the n-th power analog of Keith numbers.

Original entry on oeis.org

2, 37, 17, 7, 109, 36013476739, 31, 80051, 71, 97, 107, 13093, 103, 127, 107, 163, 991, 181, 157, 181, 199, 193, 271, 31663, 211, 307, 307, 5318989651, 673, 8297, 331, 811, 359, 463
Offset: 1

Views

Author

Giorgos Kalogeropoulos, Jul 03 2021

Keywords

Comments

The n-th power analog of Keith numbers is like Keith numbers but starting from p^n to reach p. Consider the digits of p^n where p is prime. Take their sum and repeat the process, deleting the first addend and adding the previous sum. We are searching for the first prime p that after some number of iterations reaches a sum equal to p.
The only terms for n <= 100 whose values are still unknown are a(35), a(90), a(91) and a(95).
Paolo Lava asked for these numbers as a puzzle (see the Rivera link) and as a result a(61) = 11659149703 and a(81) = 200908021 were found.

Examples

			a(2) = 37 because 37^2 = 1369. Then 1+3+6+9 = 19 and 3+6+9+19 = 37.
		

Crossrefs

Cf. A007629 (Keith numbers).
Cf. A274769, A274770, A281915, A281916, A281917, A281918, A281919, A281920, A281921 (starting with n^k, 2<=k<=10).

Programs

  • Mathematica
    KeithPowQ[m_Integer,n_]:=Module[{b=IntegerDigits[m^n],s,k=0},s=Total[b];While[sA007629 *)
Showing 1-8 of 8 results.