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.

Previous Showing 31-40 of 63 results. Next

A038868 If a Fibonacci sequence is formed with first term = number of digits in n and second term = sum of decimal digits in n, then n itself occurs as a term in the sequence after the first two terms.

Original entry on oeis.org

16, 21, 25, 50, 66, 102, 115, 154, 193, 291, 471, 573, 675, 777, 879, 2372, 3668, 4770, 6867, 22502, 22790, 32084, 41666, 46457, 167151, 331341, 490740, 1750051, 2125176, 2275226, 2425276, 2575326, 2725376, 2875426, 22597419, 73941113, 167637057, 188784525
Offset: 1

Views

Author

Keywords

Examples

			16 is a member because 2,7,9,16,25,... does contain 16.
		

Crossrefs

Programs

  • Mathematica
    aQ[n_] := Module[{d = IntegerDigits[n], a}, a[1] = Length[d]; a[2] = Total[d]; a[k_] := a[k] = a[k - 1] + a[k - 2]; k = 1; While[a[k] <= n, k++]; k--; k > 2 && a[k] == n]; Select[Range[1000], aQ] (* Amiram Eldar, Feb 17 2019 *)
    gen[d_, s_, mx_] := Block[{a=d, b=s, v = {}, t}, While[True, t=a+b; If[t <= mx, If[d == IntegerLength@ t && s == Total@ IntegerDigits@ t, AppendTo[v, t]], Break[]]; a=b; b=t]; v]; upto[mxd_] := Sort@ Flatten@ Table[gen[d, s, 10^d], {d, mxd}, {s, 9*d}]; upto[20] (* terms < 10^20, Giovanni Resta, Feb 18 2019 *)

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Sep 28 2000
a(37)-a(38) from Amiram Eldar, Feb 17 2019

A042983 Numbers n > 99 with following property: form a sequence whose initial terms are the t digits of n, later terms given by rule b(i+1) = b(i) + product of t-1 previous terms; then n itself appears in the sequence.

Original entry on oeis.org

205, 302, 1220, 1757, 3505, 4484, 59445, 80005, 99543, 393544, 1545283, 31593249, 33252489, 184577126, 139316682243, 793957132718, 3827180840962
Offset: 1

Views

Author

Keywords

Comments

a(18) > 10^13. - Giovanni Resta, Oct 19 2013

Examples

			1757 is a 4-digit term since sequence is 1, 7, 5, 7, 1*7*5+7 =42, 7*5*7+42 = 287, 5*7*42+287 = 1757.
		

Crossrefs

Cf. A007629.

Extensions

a(15)-a(17) from Giovanni Resta, Oct 19 2013

A130010 Keith numbers together with the numbers from 0 through 9.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 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

N. J. A. Sloane, Nov 05 2007

Keywords

Comments

An alternative definition of Keith numbers would allow single-digit numbers, corresponding to degenerate recurrences of the form b(i) = b(i-1).

Crossrefs

See A007629 for further information.

A162363 Binary Keith numbers, excluding positive powers of 2.

Original entry on oeis.org

1, 3, 143, 285, 569, 683, 1138, 1366, 2276, 154203, 308405, 616810, 678491, 1356981, 1480343, 2713962, 2960686, 2212558911, 4425117821, 8850235641, 17700471281
Offset: 1

Views

Author

T. D. Noe, Jul 02 2009

Keywords

Comments

This sequence uses the binary expansion of n rather than the decimal expansion used in the usual Keith numbers, A007629. A number n (having a t-bit binary representation) is in this sequence if n is a term in the t-step Fibonacci-like series beginning with the t bits of n. See the example below.
Let the bits of n be b(i) for i=1 to t. Then b(t+1) = sum_{i=1..t} b(i). Subsequent terms are b(t+k+1) = 2*b(t+k) - b(k) for k=1,2,3,.... (This is equivalent to, but faster than, the usual method of adding the previous t terms to find the next term.) Due to the growth rate of the numbers in the series, the term equal to n occurs on or before position 2t in the series.
Terms in this sequence fall into families having the same number of 1 bits. For instance, 143, 285, 569, 1138, and 2276 all have 5 bits set. Numbers in each family are either 2x or 2x-1, where x is the previous number in the family. The binary expansion of each number in family f begins with f-1 (in binary).
This sequence is infinite because for any odd prime (or base-2 pseudoprime, A001567) p=2k+1, we can create a family of numbers with 2^(2k)+1 bits set. The first number in that family is 2^c + c(2^c-2)/(4^p-1) + 1, where c=2^p-1. In binary, this number is a 1 followed by a repeating pattern of p zeros and p ones and terminated by 1, for a total of 2^p bits. For example, 2212558911 is 10000011111000001111100000111111 in binary.

Examples

			In binary, 143 = (1,0,0,0,1,1,1,1). Subsequent terms are 5,9,18,36,72,143.
		

Programs

  • Maple
    isA162363 := proc(n)
        local L,t,a ;
        if numtheory[factorset](n) = {2} then
            return false;
        end if;
        L := ListTools[Reverse](convert(n,base,2)) ;
        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 isA162363(n) then
            printf("%d,\n",n);
        end if;
    end do: # R. J. Mathar, Jan 12 2016
  • Mathematica
    IsKeith2[n_Integer] := Module[{b,s}, b=IntegerDigits[n,2]; s=Total[b]; If[s<=1, n==1, k=1; While[s=2*s-b[[k]]; s
    				

Extensions

Corrected name T. D. Noe, Jul 11 2009
Typo in binary for 2212558911 corrected by Jaroslav Krizek, Dec 09 2015

A186830 Keith sequence for the number 197.

Original entry on oeis.org

1, 9, 7, 17, 33, 57, 107, 197, 361, 665, 1223, 2249, 4137, 7609, 13995, 25741, 47345, 87081, 160167, 294593, 541841, 996601, 1833035, 3371477, 6201113, 11405625, 20978215, 38584953, 70968793, 130531961
Offset: 1

Views

Author

N. J. A. Sloane, Feb 27 2011

Keywords

Comments

This sequence illustrates why 197 is a Keith number (cf. A007629).
Other multiples of 197 in the sequence are 4137 and 992207243244533. - Alonso del Arte, Mar 14 2011

Crossrefs

Cf. A007629.

Programs

  • Mathematica
    keithSeq[n_Integer, b_:10, goBeyondN_:0] := Module[{seq = IntegerDigits[n, b], ord, max = n + goBeyondN, curr}, ord = Length[seq]; curr = seq[[-1]]; While[curr < max, curr = Plus@@Take[seq, -ord]; seq = Append[seq, curr]]; Return[seq]]; keithSeq[197, 10, 10^8] (* Alonso del Arte, Mar 14 2011 *)
  • PARI
    Vec((1+8*x-3*x^2)/(1-x-x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Feb 04 2013

Formula

a(1)=1, a(2)=9, a(3)=7; thereafter a(n) = sum of previous three terms. Note that 197 appears in the sequence, which is why 197 is a Keith number.
G.f.: x*(1+8*x-3*x^2)/(1-x-x^2-x^3). [Colin Barker, Jun 19 2012]

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}]

A188381 Negabinary Keith numbers.

Original entry on oeis.org

2, 3, 4, 7, 9, 13, 16, 36, 55, 64, 162, 256, 458, 1024, 1829, 4096, 7316, 15119, 16384, 18970, 37702, 37723, 45171, 60476, 65536, 84506, 262144, 277263, 1048576, 1109052, 1722002, 2160570, 4194304, 10549178, 12699958, 15084573, 16777216, 31921069, 67108864
Offset: 1

Views

Author

Alonso del Arte, Mar 29 2011

Keywords

Comments

Keith numbers are described in A007629. All powers of 4 appear. However, 2 is the only number of the form 2^n with n odd that appears in the sequence. That's because in negabinary, such numbers are represented as 11 followed by n 0's, and that leads to the sequence 1, 1, 0, ... , 0, 2, 3, 5, 10, 20, 40, 80, 160, ... up to 5(2^(n - 2)), and 5(2^(n - 2)) > 2^(n - 1). (See A020714).

Crossrefs

Programs

  • Mathematica
    (* First run the program from A039724 to define ToNegaBases *) 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[2, 32768], keithFromListQ[#, IntegerDigits[ToNegaBases[#, 2]]] &]

Extensions

a(33)-a(39) from Amiram Eldar, Jan 29 2020

A243140 Numbers n such that n appears in the sequence beginning with the digit-product of n and extended by adding successive digit-products.

Original entry on oeis.org

22, 26, 38, 55, 62, 88, 95, 102, 104, 108, 116, 122, 126, 138, 162, 174, 202, 206, 218, 234, 258, 410, 414, 430, 442, 474, 586, 826, 922, 1318, 1342, 1366, 1474, 1586, 1826, 1922, 1958, 2318, 2366, 2582, 2742, 3174, 3258, 3498, 4362
Offset: 1

Views

Author

Anthony Sand, May 30 2014

Keywords

Comments

Numbers n>9 with following property: form a sequence b(i) whose initial term is digit-product(n). Later terms are given by the rule that b(i) = b(i-1) + digit-product(b(i-1)) and n itself appears in the sequence.
The function digit-product(n) multiplies all nonzero digits of n (A051801). For example, digit-product(1230) = 1 * 2 * 3 = 6. The resultant sequence appears in A063114, n + product of nonzero digits of n.

Examples

			The digit-product sequence for 22 begins with digit-product(22)= 4, 4 + 4 = 8, 8 + 8 = 16, 16 + 6 = 22. Since this procedure returns to the initial number 22, it belongs here.
The digit-product sequence for 102 begins with 2, 2 + 2 = 4, 4 + 4 = 8, 8 + 8 = 16, 16 + 6 = 22, 22 + 4 = 26, 26 + 12 = 38, 38 + 24 = 62, 62 + 12 = 74, 74 + 28 = 102. Since this procedure returns to the initial number 102, it belongs here.
		

Crossrefs

Programs

  • PARI
    dp(n)=my(v=select(k->k>1,digits(n))); prod(i=1,#v,v[i])
    is(n)=my(t=dp(n)); until(t>=n, t+=dp(t)); t==n \\ Charles R Greathouse IV, Jun 05 2014

Formula

b(i) = b(i-1) + digit-product(b(i-1)).

A282760 5*n analog to Keith numbers.

Original entry on oeis.org

2, 4, 6, 8, 9, 10, 12, 14, 16, 18, 19, 28, 56, 147, 566, 1301, 4288, 8576, 13088, 119396, 518800, 634825, 654780, 993476, 2109420, 3034105, 6466772, 17838948, 80148824
Offset: 1

Views

Author

Paolo P. Lava, Feb 22 2017

Keywords

Comments

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

Examples

			5*14 = 70:
7 + 0 = 7;
0 + 7 = 7;
7 + 7 = 14.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, n, t, v; v:=array(1..h);
    for n from 1 to q do a:=w*n; b:=ilog10(a)+1; if b>1 then
    for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    Select[Range[10^6], Function[n, Module[{d = IntegerDigits[5 n], s, k = 0}, s = Total@ d; While[s < n, AppendTo[d, s]; k++; s = 2 s - d[[k]]];
    s == n]]] (* Michael De Vlieger, Feb 22 2017, after T. D. Noe at A007629 *)

A282761 6*n analog to Keith numbers.

Original entry on oeis.org

9, 23, 85, 88, 208, 953, 12339, 122420, 251925, 286400, 467608, 1207360, 1308519, 1537214, 1638373, 1844108, 2314739, 2736742, 9331102, 11692851, 28349534, 85403569
Offset: 1

Views

Author

Paolo P. Lava, Feb 22 2017

Keywords

Comments

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

Examples

			6*23 = 138:
1 + 3 + 8 = 12;
3 + 8 + 12 = 23.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q, h,w) local a, b, k, n, t, v; v:=array(1..h);
    for n from 1 to q do a:=w*n; b:=ilog10(a)+1; if b>1 then
    for k from 1 to b do v[b-k+1]:=(a mod 10); a:=trunc(a/10); od; t:=b+1; v[t]:=add(v[k], k=1..b); while v[t]
    				
  • Mathematica
    Select[Range[10^6], Function[n, Module[{d = IntegerDigits[6 n], s, k = 0}, s = Total@ d; While[s < n, AppendTo[d, s]; k++; s = 2 s - d[[k]]]; s == n]]] (* Michael De Vlieger, Feb 22 2017, after T. D. Noe at A007629 *)
Previous Showing 31-40 of 63 results. Next