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-10 of 15 results. Next

A160552 a(0)=0, a(1)=1; a(2^i+j) = 2*a(j) + a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 5, 11, 17, 15, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31, 5, 11, 17, 19, 21, 39, 49, 35, 21, 39, 53, 59, 81, 127, 129, 63, 1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31
Offset: 0

Views

Author

David Applegate, May 18 2009

Keywords

Comments

This recurrence is patterned after the one for A152980, but without the special cases.
Sequence viewed as triangle:
0,
1,
1, 3,
1, 3, 5, 7,
1, 3, 5, 7, 5, 11, 17, 15,
1, 3, 5, 7, 5, 11, 17, 15, 5, 11, 17, 19, 21, 39, 49, 31.
The rows converge to A151548.
Also the sum of the terms in the k-th row (k >= 1) is 4^(k-1). Proof by induction. - N. J. A. Sloane, Jan 21 2010
If this sequence [1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 5, 11, 17, 15, ...] is convolved with [1, 2, 2, 2, 2, 2, 2, ...] we obtain A139250, the toothpick sequence. Example: A139250(5) = 15 = (1, 2, 2, 2, 2) * (3, 1, 3, 1, 1). - Gary W. Adamson, May 19 2009
Starting with 1 and convolved with [1, 2, 0, 0, 0, ...] = A151548. - Gary W. Adamson, Jun 04 2009
Refer to A162956 for the analogous triangle using N=3. - Gary W. Adamson, Jul 20 2009
It appears that the sums of two successive terms give the positive terms of A139251. - Omar E. Pol, Feb 18 2015

Examples

			a(2) = a(2^1+0) = 2*a(0) + a(1) = 1, a(3) = a(2^1+1) = 2*a(1) + a(2) = 3*a(2^i) = 2*a(0) + a(1) = 1.
		

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Maple
    S:=proc(n) option remember; local i,j; if n <= 1 then RETURN(n); fi; i:=floor(log(n)/log(2)); j:=n-2^i; 2*S(j)+S(j+1); end; # N. J. A. Sloane, May 18 2009
    H := x*(1+2*x)/(1+x) + (4*x^2/(1+2*x))*(mul(1+x^(2^k-1)+2*x^(2^k),k=1..20)-1); series(H,x,120); # N. J. A. Sloane, May 23 2009
  • Mathematica
    Nest[Join[#, 2 # + Append[Rest@#, 1]] &, {0}, 7] (* Ivan Neretin, Feb 09 2017 *)

Formula

G.f.: x*(1+2*x)/(1+x) + (4*x^2/(1+2*x))*(-1 + Product_{k>=1} (1 + x^(2^k-1) + 2*x^(2^k))). - N. J. A. Sloane, May 23 2009, based on Gary W. Adamson's comment above and the known g.f. for A139250.
It appears that a(n) = A169708(n)/4, n >= 1. - Omar E. Pol, Feb 15 2015
It appears that a(n) = A139251(n) - a(n-1), n >= 1. - Omar E. Pol, Feb 18 2015

A118977 a(0)=0, a(1)=1; a(2^i+j) = a(j) + a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 3, 3, 1, 2, 3, 3, 3, 5, 6, 4, 1, 2, 3, 3, 3, 5, 6, 4, 3, 5, 6, 6, 8, 11, 10, 5, 1, 2, 3, 3, 3, 5, 6, 4, 3, 5, 6, 6, 8, 11, 10, 5, 3, 5, 6, 6, 8, 11, 10, 7, 8, 11, 12, 14, 19, 21, 15, 6, 1, 2, 3, 3, 3, 5, 6, 4, 3, 5, 6, 6, 8, 11, 10, 5, 3, 5, 6, 6, 8, 11, 10, 7, 8, 11, 12, 14, 19, 21, 15
Offset: 0

Views

Author

Gary W. Adamson, May 07 2006

Keywords

Comments

The original definition from Gary W. Adamson: Iterative sequence in 2^n subsets generated from binomial transform operations. Let S = a string s(1) through s(2^n); and B = appended string. Say S = (1, 1, 2, 1). Perform the binomial transform operation on S as a vector: [1, 1, 2, 1, 0, 0, 0, ...] = 1, 2, 5, 11, 21, 36, ... Then, performing the analogous operation on B gives a truncated version of the previous sequence: (2, 5, 11, 21, ...). Given a subset s(1) through s(2^n), say s(1), ..., s(4) = (a,b,c,d). Use the operation ((a+b), (b+c), (c+d), d) and append the result to the right of the previous string. Perform the next operation on s(1) through s(2^(n+1)). s(1), ..., s(4) = (1, 1, 2, 1). The operation gives ((1+1), (1+2), (2+1), (1)) = (2, 3, 3, 1) which we append to (1, 1, 2, 1), giving s(1) through s(8): (1, 1, 2, 1, 2, 3, 3, 1).

Examples

			From _N. J. A. Sloane_, Jun 01 2009: (Start)
Has a natural structure as a triangle:
  0,
  1,
  1,2,
  1,2,3,3,
  1,2,3,3,3,5,6,4,
  1,2,3,3,3,5,6,4,3,5,6,6,8,11,10,5,
  1,2,3,3,3,5,6,4,3,5,6,6,8,11,10,5,3,5,6,6,8,11,10,7,8,11,12,14,19,21,15,6,
  1,2,3,3,3,5,6,4,3,5,...
In this form the rows converge to (1 followed by A160573) or A151687. (End)
		

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.
Cf. A163267 (partial sums). - N. J. A. Sloane, Jan 07 2010

Programs

  • Maple
    Maple code for the rows of the triangle (PP(n) is a g.f. for the (n+1)-st row):
    g:=n->1+x^(2^n-1)+x^(2^n);
    c:=n->x^(2^n-1)*(1-x^(2^n));
    PP:=proc(n) option remember; global g,c;
    if n=1 then 1+2*x else series(g(n-1)*PP(n-1)-c(n-1),x,10000); fi; end; # N. J. A. Sloane, Jun 01 2009
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = (j = n - 2^Floor[Log[2, n]]; a[j] + a[j + 1]); Array[a, 95, 0] (* Jean-François Alcover, Nov 10 2016 *)

Formula

a(0)=0; a(2^i)=1. For n >= 3 let n = 2^i + j, where 1 <= j < 2^i. Then a(n) = Sum_{k >= 0} binomial( wt(j+k),k ), where wt() = A000120(). - N. J. A. Sloane, Jun 01 2009
G.f.: ( x + x^2 * Product_{ n >= 0} (1 + x^(2^n-1) + x^(2^n)) ) / (1+x). - N. J. A. Sloane, Jun 08 2009

Extensions

New definition and more terms from N. J. A. Sloane, May 25 2009

A151702 a(0)=1, a(1)=0; a(2^i + j) = a(j) + a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 3, 4, 3, 1, 1, 2, 2, 2, 3, 4, 3, 2, 3, 4, 4, 5, 7, 7, 4, 1, 1, 2, 2, 2, 3, 4, 3, 2, 3, 4, 4, 5, 7, 7, 4, 2, 3, 4, 4, 5, 7, 7, 5, 5, 7, 8, 9, 12, 14, 11, 5, 1, 1, 2, 2, 2, 3, 4, 3, 2, 3, 4, 4, 5, 7, 7, 4, 2, 3, 4, 4, 5, 7, 7, 5, 5, 7, 8, 9, 12, 14, 11, 5, 2, 3, 4, 4, 5, 7, 7
Offset: 0

Views

Author

N. J. A. Sloane, Jun 06 2009

Keywords

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.
If first two terms are dropped, same as A151552.

Programs

  • Maple
    f:=proc(r,s,a,b) local s1,n,i,j;
    s1:=array(0..120);
    s1[0]:=r; s1[1]:=s;
    for n from 2 to 120 do i:=floor(log(n)/log(2));
    j:=n-2^i; s1[n]:=a*s1[j]+b*s1[j+1]; od:
    [seq(s1[n],n=0..120)];
    end;
    f(1,0,1,1);
  • Mathematica
    a = {1, 0}; Do[AppendTo[a, a[[j]] + a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jun 28 2017 *)

A151703 a(0)=1, a(1)=0; a(2^i+j) = a(j) + 2*a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 0, 1, 2, 1, 2, 5, 4, 1, 2, 5, 4, 5, 12, 13, 6, 1, 2, 5, 4, 5, 12, 13, 6, 5, 12, 13, 14, 29, 38, 25, 8, 1, 2, 5, 4, 5, 12, 13, 6, 5, 12, 13, 14, 29, 38, 25, 8, 5, 12, 13, 14, 29, 38, 25, 16, 29, 38, 41, 72, 105, 88, 41, 10, 1, 2, 5, 4, 5, 12, 13, 6, 5, 12, 13, 14, 29, 38, 25, 8, 5, 12, 13, 14
Offset: 0

Views

Author

N. J. A. Sloane, Jun 06 2009

Keywords

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.
If first two terms are dropped, same as A151691.

Programs

  • Maple
    See A151702 for Maple code.
  • Mathematica
    a = {1, 0}; Do[AppendTo[a, a[[j]] + 2 a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jul 04 2017 *)

A151568 a(0)=1, a(1)=1; a(2^i+j)=2*a(j)+a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 1, 3, 5, 3, 5, 11, 13, 3, 5, 11, 13, 11, 21, 35, 29, 3, 5, 11, 13, 11, 21, 35, 29, 11, 21, 35, 37, 43, 77, 99, 61, 3, 5, 11, 13, 11, 21, 35, 29, 11, 21, 35, 37, 43, 77, 99, 61, 11, 21, 35, 37, 43, 77, 99, 69, 43, 77, 107, 117, 163, 253, 259, 125, 3, 5, 11, 13, 11, 21, 35, 29, 11
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009

Keywords

Comments

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Mathematica
    a = {1, 1}; Do[AppendTo[a, 2 a[[j]] + a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jul 04 2017 *)

A151569 a(0)=1, a(1)=2; a(2^i+j)=2*a(j)+a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 2, 4, 8, 4, 8, 16, 20, 4, 8, 16, 20, 16, 32, 52, 44, 4, 8, 16, 20, 16, 32, 52, 44, 16, 32, 52, 56, 64, 116, 148, 92, 4, 8, 16, 20, 16, 32, 52, 44, 16, 32, 52, 56, 64, 116, 148, 92, 16, 32, 52, 56, 64, 116, 148, 104, 64, 116, 160, 176, 244, 380, 388, 188, 4, 8, 16, 20, 16, 32, 52
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009

Keywords

Comments

Equals 2*A160552+A151704.

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Mathematica
    a = {1, 2}; Do[AppendTo[a, 2 a[[j]] + a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jul 04 2017 *)

A151570 a(0)=1, a(1)=1; a(2^i + j) = a(j) + a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 5, 5, 2, 3, 5, 5, 5, 8, 10, 7, 2, 3, 5, 5, 5, 8, 10, 7, 5, 8, 10, 10, 13, 18, 17, 9, 2, 3, 5, 5, 5, 8, 10, 7, 5, 8, 10, 10, 13, 18, 17, 9, 5, 8, 10, 10, 13, 18, 17, 12, 13, 18, 20, 23, 31, 35, 26, 11, 2, 3, 5, 5, 5, 8, 10, 7, 5, 8, 10, 10, 13, 18, 17, 9, 5, 8, 10, 10, 13, 18, 17, 12
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009

Keywords

Comments

Equals A118977 + A151702.

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Mathematica
    a = {1, 1}; Do[AppendTo[a, a[[j]] + a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jun 28 2017 *)

A151572 a(0)=0, a(1)=1; a(2^i + j) = a(j) + 2*a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

0, 1, 2, 5, 2, 5, 12, 9, 2, 5, 12, 9, 12, 29, 30, 13, 2, 5, 12, 9, 12, 29, 30, 13, 12, 29, 30, 33, 70, 89, 56, 17, 2, 5, 12, 9, 12, 29, 30, 13, 12, 29, 30, 33, 70, 89, 56, 17, 12, 29, 30, 33, 70, 89, 56, 37, 70, 89, 96, 173, 248, 201, 90, 21, 2, 5, 12, 9, 12, 29, 30, 13, 12, 29, 30, 33, 70
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009

Keywords

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Mathematica
    a = {0, 1}; Do[AppendTo[a, a[[j]] + 2 a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jun 28 2017 *)

A151573 a(0)=1, a(1)=1; a(2^i + j) = a(j) + 2*a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 1, 3, 7, 3, 7, 17, 13, 3, 7, 17, 13, 17, 41, 43, 19, 3, 7, 17, 13, 17, 41, 43, 19, 17, 41, 43, 47, 99, 127, 81, 25, 3, 7, 17, 13, 17, 41, 43, 19, 17, 41, 43, 47, 99, 127, 81, 25, 17, 41, 43, 47, 99, 127, 81, 53, 99, 127, 137, 245, 353, 289, 131, 31, 3, 7, 17, 13, 17, 41, 43, 19, 17
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009

Keywords

Comments

Equals A151572 + A151703.

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Maple
    N:= 10: # to get a(0) to a(2^(N+1)-1)
    a[0]:= 1:
    a[1]:= 1:
    for i from 1 to N do
      for j from 0 to 2^i-1 do
        a[2^i+j]:= a[j]+2*a[j+1]
      od
    od:
    seq(a[i],i=0..2^(N+1)-1); # Robert Israel, May 28 2014
  • Mathematica
    a = {1, 1}; Do[AppendTo[a, a[[j]] + 2 a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jun 28 2017 *)

A151574 a(0)=1, a(1)=2; a(2^i + j) = a(j) + 2*a(j+1) for 0 <= j < 2^i.

Original entry on oeis.org

1, 2, 5, 12, 5, 12, 29, 22, 5, 12, 29, 22, 29, 70, 73, 32, 5, 12, 29, 22, 29, 70, 73, 32, 29, 70, 73, 80, 169, 216, 137, 42, 5, 12, 29, 22, 29, 70, 73, 32, 29, 70, 73, 80, 169, 216, 137, 42, 29, 70, 73, 80, 169, 216, 137, 90, 169, 216, 233, 418, 601, 490, 221, 52, 5, 12, 29, 22, 29
Offset: 0

Views

Author

N. J. A. Sloane, May 25 2009

Keywords

Comments

Equals 2*A151572 + A151703.

Crossrefs

For the recurrence a(2^i+j) = C*a(j) + D*a(j+1), a(0) = A, a(1) = B for following values of (A B C D) see: (0 1 1 1) A118977, (1 0 1 1) A151702, (1 1 1 1) A151570, (1 2 1 1) A151571, (0 1 1 2) A151572, (1 0 1 2) A151703, (1 1 1 2) A151573, (1 2 1 2) A151574, (0 1 2 1) A160552, (1 0 2 1) A151704, (1 1 2 1) A151568, (1 2 2 1) A151569, (0 1 2 2) A151705, (1 0 2 2) A151706, (1 1 2 2) A151707, (1 2 2 2) A151708.

Programs

  • Mathematica
    a = {1, 2}; Do[AppendTo[a, a[[j]] + 2 a[[j + 1]]], {i, 6}, {j, 2^i}]; a (* Ivan Neretin, Jun 28 2017 *)
Showing 1-10 of 15 results. Next