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 10 results.

A152980 First differences of toothpick corner sequence A153006.

Original entry on oeis.org

1, 2, 3, 3, 4, 7, 8, 5, 4, 7, 9, 10, 15, 22, 20, 9, 4, 7, 9, 10, 15, 22, 21, 14, 15, 23, 28, 35, 52, 64, 48, 17, 4, 7, 9, 10, 15, 22, 21, 14, 15, 23, 28, 35, 52, 64, 49, 22, 15, 23, 28, 35, 52, 65, 56, 43, 53, 74, 91, 122, 168, 176, 112, 33, 4, 7, 9, 10, 15, 22, 21, 14, 15, 23, 28, 35, 52
Offset: 0

Views

Author

Omar E. Pol, Dec 16 2008, Dec 19 2008, Jan 02 2009

Keywords

Comments

Rows of A152978 when written as a triangle converge to this sequence. - Omar E. Pol, Jul 19 2009

Examples

			Triangle begins:
.1;
.2;
.3,3;
.4,7,8,5;
.4,7,9,10,15,22,20,9;
.4,7,9,10,15,22,21,14,15,23,28,35,52,64,48,17;
....
Rows converge to A153001. - _N. J. A. Sloane_, Jun 07 2009
		

Crossrefs

Equals A151688 divided by 2. - N. J. A. Sloane, Jun 03 2009
For generating functions of the form Product_{k>=c} (1+a*x^(2^k-1)+b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Equals A147646/4. - N. J. A. Sloane, May 01 2009

Programs

  • Maple
    Maple code from N. J. A. Sloane, May 18 2009. First define old version with offset 1:
    S:=proc(n) option remember; local i,j;
    if n <= 0 then RETURN(0); fi;
    if n <= 2 then RETURN(2^(n-1)); fi;
    i:=floor(log(n)/log(2));
    j:=n-2^i;
    if j=0 then RETURN(n/2+1); fi;
    if j<2^i-1 then RETURN(2*S(j)+S(j+1)); fi;
    if j=2^i-1 then RETURN(2*S(j)+S(j+1)-1); fi;
    -1;
    end;
    # Now change the offset:
    T:=n->S(n+1);
    G := (1 + x) * mul(1 + x^(2^k-1) + 2*x^(2^k),k=1..20);
  • Mathematica
    nmax = 78;
    G = x*((1 + x)/(1 - x)) * Product[ (1 + x^(2^n - 1) + 2*x^(2^n)), {n, 1, Log2[nmax] // Ceiling}];
    CoefficientList[G + O[x]^nmax, x] // Differences (* Jean-François Alcover, Jul 21 2022 *)

Formula

G.f.: (1 + x) * Prod_{ n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)). - N. J. A. Sloane, May 20 2009, corrected May 21 2009
For formula see A147646 (or, better, see the Maple code below).

Extensions

More terms (based on A147646) from N. J. A. Sloane, May 01 2009
Offset changed by N. J. A. Sloane, May 18 2009

A151552 G.f.: Product_{k>=1} (1 + x^(2^k-1) + x^(2^k)).

Original entry on oeis.org

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, 5, 5
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2009, Dec 26 2009

Keywords

Examples

			Written as a triangle:
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,5,5,...
The rows converge to A151714.
		

Crossrefs

For generating functions of the form Product_{k>=c} (1 + a*x^(2^k-1) + b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.

Programs

  • Maple
    G := mul( 1 + x^(2^n-1) + x^(2^n), n=1..20);
    wt := proc(n) local w,m,i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end:
    f:=proc(n) local t1,k; global wt; t1:=0; for k from 0 to 20 do if n+k mod 2 = 0 then t1:=t1+binomial(wt(n+k),k); fi; od; t1; end;
  • Mathematica
    a[n_] := Sum[If[EvenQ[n + k], Binomial[DigitCount[n + k, 2, 1], k], 0], {k, 0, Floor[Log2[n + 1]]}]; Array[a, 100, 0] (* Amiram Eldar, Jul 29 2023 *)

Formula

a(n) = 1 for 0 <= n <= 3; thereafter write n = 2^i + j, with 0 <= j < 2^i, then a(n) = a(j) + a(j+1), except that a(2^(i+1)-2) = a(2^(i+1)-1) = 1.
a(n) = Sum_{k>=0, n+k even} binomial(A000120(n+k),k); the sum may be restricted further to k <= A000523(n+1). - Hagen von Eitzen, May 20 2009 [corrected by Amiram Eldar, Jul 29 2023]

A151550 Expansion of g.f. Product_{n >= 1} (1 + x^(2^n-1) + 2*x^(2^n)).

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 4, 1, 3, 4, 5, 5, 10, 12, 8, 1, 3, 4, 5, 5, 10, 12, 9, 5, 10, 13, 15, 20, 32, 32, 16, 1, 3, 4, 5, 5, 10, 12, 9, 5, 10, 13, 15, 20, 32, 32, 17, 5, 10, 13, 15, 20, 32, 33, 23, 20, 33, 41, 50, 72, 96, 80, 32, 1, 3, 4, 5, 5, 10, 12, 9, 5, 10, 13, 15, 20, 32, 32, 17, 5, 10, 13
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2009, Jun 17 2009

Keywords

Comments

When convolved with [1, 2, 2, 2, ...] gives the toothpick sequence A153006: (1, 3, 6, 9, ...). - Gary W. Adamson, May 25 2009
This sequence and the Adamson's comment both are mentioned in the Applegate-Pol-Sloane article, see chapter 8 "generating functions". - Omar E. Pol, Sep 20 2011

Examples

			From _Omar E. Pol_, Jun 09 2009, edited by _N. J. A. Sloane_, Jun 17 2009:
May be written as a triangle:
  0;
  1;
  1,2;
  1,3,4,4;
  1,3,4,5,5,10,12,8;
  1,3,4,5,5,10,12,9,5,10,13,15,20,32,32,16;
  1,3,4,5,5,10,12,9,5,10,13,15,20,32,32,17,5,10,13,15,20,32,33,23,20,33,41,...
The rows of the triangle converge to A151555.
		

References

  • D. Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191

Crossrefs

For generating functions of the form Product_{k>=c} (1+a*x^(2^k-1)+b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Cf. A000079. - Omar E. Pol, Jun 09 2009

Programs

  • Mathematica
    terms = 100;
    CoefficientList[Product[(1+x^(2^n-1) + 2 x^(2^n)), {n, 1, Log[2, terms] // Ceiling}] + O[x]^terms, x] (* Jean-François Alcover, Aug 05 2018 *)

Formula

To get a nice recurrence, change the offset to 0 and multiply the g.f. by x as in the triangle in the example lines. Then we have: a(0)=0; a(2^i)=1; a(2^i-1)=2^(i-1) for i >= 1; otherwise write n = 2^i+j with 1 <= j <= 2^i-2, then a(n) = a(2^i+j) = 2*a(j) + a(j+1).

A160573 G.f.: Product_{k >= 0} (1 + x^(2^k-1) + x^(2^k)).

Original entry on oeis.org

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, 3, 5, 6, 6, 8, 11, 10, 7, 8, 11, 12, 14, 19, 21, 15, 8, 8, 11, 12, 14, 19, 21, 17, 15, 19, 23, 26, 33, 40, 36, 21, 7, 3, 5, 6, 6, 8, 11, 10, 7, 8, 11, 12, 14, 19, 21, 15, 8, 8
Offset: 0

Views

Author

Hagen von Eitzen, May 20 2009

Keywords

Comments

Sequence mentioned in the Applegate-Pol-Sloane article; see Section 9, "explicit formulas." - Omar E. Pol, Sep 20 2011

Examples

			a(5) = binomial(2,0) + binomial(2,1) + binomial(3,2) + binomial(1,3) + binomial(2,4) + binomial(2,5) + ... = 1 + 2 + 3 + 0 + 0 + 0 + ... = 6
From _Omar E. Pol_, Jun 09 2009: (Start)
Triangle begins:
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;
3,5,6,6,8,11,10,7,8,11,12,14,19,21,15,8,8,11,12,14,19,21,17,15,19,23,26,...
(End)
		

References

  • D. Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191

Crossrefs

For generating functions of the form Product_{k>=c} (1+a*x^(2^k-1)+b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Row sums of A151683. See A151687 for another version.
Cf. A151552 (g.f. has one factor fewer).
Limiting form of rows of A118977 when that sequence is written as a triangle and the initial 1 is omitted. - N. J. A. Sloane, Jun 01 2009
Cf. A139250, A139251. - Omar E. Pol, Sep 20 2011

Programs

  • Maple
    See A118977 for Maple code.
  • Mathematica
    max = 80; Product[1 + x^(2^k - 1) + x^(2^k), {k, 0, Ceiling[Log[2, max]]}] + O[x]^max // CoefficientList[#, x]& (* Jean-François Alcover, Nov 10 2016 *)

Formula

a(n) = Sum_{i >= 0} binomial(A000120(n+i),i).
For k >= 1, a(2^k-2) = k+1 and a(2^k-1) = 3; otherwise if n = 2^i + j, 0 <= j <= 2^i-3, a(n) = a(j) + a(j+1).
a(n) = 2*A151552(n) + A151552(n-1).

A151688 G.f.: Product_{n>=0} (1 + x^(2^n-1) + 2*x^(2^n)).

Original entry on oeis.org

2, 4, 6, 6, 8, 14, 16, 10, 8, 14, 18, 20, 30, 44, 40, 18, 8, 14, 18, 20, 30, 44, 42, 28, 30, 46, 56, 70, 104, 128, 96, 34, 8, 14, 18, 20, 30, 44, 42, 28, 30, 46, 56, 70, 104, 128, 98, 44, 30, 46, 56, 70, 104, 130, 112, 86, 106, 148, 182, 244, 336, 352, 224, 66, 8, 14, 18, 20, 30, 44
Offset: 0

Views

Author

Omar E. Pol, May 02 2009

Keywords

Comments

This is essentially the same g.f. as A151550 but with the n=0 term included.

Examples

			If written as a triangle, begins:
  2;
  4;
  6, 6;
  8, 14, 16, 10;
  8, 14, 18, 20, 30, 44, 40, 18;
  8, 14, 18, 20, 30, 44, 42, 28, 30, 46, 56, 70, 104, 128, 96, 34;
  ...
		

Crossrefs

Equals 2*A152980 = A147646/2.
Equals limit of rows of triangle in A152968.
For generating functions of the form Product_{k>=c} (1 + a*x^(2^k-1) + b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.

Programs

  • Mathematica
    terms = 70; CoefficientList[Product[(1+x^(2^n-1) + 2 x^(2^n)), {n, 0, Log[2, terms] // Ceiling}] + O[x]^terms, x] (* Stefano Spezia, Sep 02 2025 *)

Formula

a(n) = Sum_{k>=0} 2^(wt(n+k)-k)*binomial(wt(n+k),k).

Extensions

Edited by N. J. A. Sloane, Jun 03 2009, Jul 14 2009

A151691 G.f.: Product_{k>=1} (1 + 2*x^(2^k-1) + x^(2^k)).

Original entry on oeis.org

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, 29
Offset: 0

Views

Author

N. J. A. Sloane, Jun 04 2009

Keywords

Examples

			From _Omar E. Pol_, Jun 09 2009: (Start)
Triangle begins:
  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,...
(End)
		

Crossrefs

For generating functions of the form Product_{k>=c} (1 + a*x^(2^k-1) + b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Cf. A151685. See A151703 for another version with a simpler recurrence.
Cf. A000079. - Omar E. Pol, Jun 09 2009

A151692 G.f.: Product_{k>=2} (1 + x^(2^k-1) + x^(2^k)).

Original entry on oeis.org

1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 2, 1, 0, 0, 1, 1, 0, 1, 2, 1, 0, 1, 2, 1, 1, 3, 3, 1, 0, 0, 1, 1, 0, 1, 2, 1, 0, 1, 2, 1, 1, 3, 3, 1, 0, 1, 2, 1, 1, 3, 3, 1, 1, 3, 3, 2, 4, 6, 4, 1, 0, 0, 1, 1, 0, 1, 2, 1, 0, 1, 2, 1, 1, 3, 3, 1, 0, 1, 2, 1, 1, 3, 3, 1, 1, 3, 3, 2, 4, 6, 4, 1, 0, 1, 2, 1, 1, 3, 3, 1, 1, 3, 3, 2
Offset: 0

Views

Author

N. J. A. Sloane, Jun 04 2009

Keywords

Examples

			From _Omar E. Pol_, Jun 09 2009: (Start)
Triangle begins:
  1;
  0,0;
  1,1,0,0;
  1,1,0,1,2,1,0,0;
  1,1,0,1,2,1,0,1,2,1,1,3,3,1,0,0;
  1,1,0,1,2,1,0,1,2,1,1,3,3,1,0,1,2,1,1,3,3,1,1,3,3,2,4,6,4,1,0,0;
  1,1,0,1,2,1,0,1,2,1,1,3,3,1,0,1,2,1,1,3,3,1,1,3,3,2,4,6,4,1,0,1,2,1,1,3,3,...
(End)
		

Crossrefs

For generating functions of the form Product_{k>=c} (1 + a*x^(2^k-1) + b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Cf. A000079. - Omar E. Pol, Jun 09 2009

A151693 G.f.: Product_{k>=0} (1 + 2*x^(2^k-1) + 2*x^(2^k)).

Original entry on oeis.org

3, 8, 10, 10, 22, 36, 28, 14, 22, 36, 40, 64, 116, 128, 72, 22, 22, 36, 40, 64, 116, 128, 84, 72, 116, 152, 208, 360, 488, 400, 176, 38, 22, 36, 40, 64, 116, 128, 84, 72, 116, 152, 208, 360, 488, 400, 188, 88, 116, 152, 208, 360, 488, 424, 312, 376, 536, 720, 1136, 1696, 1776
Offset: 0

Views

Author

N. J. A. Sloane, Jun 04 2009

Keywords

Examples

			From _Omar E. Pol_, Jun 09 2009: (Start)
Triangle begins:
   3;
   8,10;
  10,22,36,28;
  14,22,36,40,64,116,128,72;
  22,22,36,40,64,116,128,84,72,116,152,208,360,488,400,176;
  38,22,36,40,64,116,128,84,72,116,152,208,360,488,400,188,88,116,152,208,...
(End)
		

Crossrefs

For generating functions of the form Product_{k>=c} (1 + a*x^(2^k-1) + b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Cf. A000079. - Omar E. Pol, Jun 09 2009

A151694 G.f.: Product_{k>=1} (1 + 2*x^(2^k-1) + 2*x^(2^k)).

Original entry on oeis.org

1, 2, 2, 2, 6, 8, 4, 2, 6, 8, 8, 16, 28, 24, 8, 2, 6, 8, 8, 16, 28, 24, 12, 16, 28, 32, 48, 88, 104, 64, 16, 2, 6, 8, 8, 16, 28, 24, 12, 16, 28, 32, 48, 88, 104, 64, 20, 16, 28, 32, 48, 88, 104, 72, 56, 88, 120, 160, 272, 384, 336, 160, 32, 2, 6, 8, 8, 16, 28, 24, 12, 16, 28, 32, 48, 88
Offset: 0

Views

Author

N. J. A. Sloane, Jun 04 2009

Keywords

Examples

			From _Omar E. Pol_, Jun 09 2009: (Start)
Triangle begins:
  1;
  2,2;
  2,6,8,4;
  2,6,8,8,16,28,24,8;
  2,6,8,8,16,28,24,12,16,28,32,48,88,104,64,16;
  2,6,8,8,16,28,24,12,16,28,32,48,88,104,64,20,16,28,32,48,88,104,72,56,88,...
(End)
		

Crossrefs

For generating functions of the form Product_{k>=c} (1 + a*x^(2^k-1) + b*x^2^k) for the following values of (a,b,c) see: (1,1,0) A160573, (1,1,1) A151552, (1,1,2) A151692, (2,1,0) A151685, (2,1,1) A151691, (1,2,0) A151688 and A152980, (1,2,1) A151550, (2,2,0) A151693, (2,2,1) A151694.
Cf. A000079. - Omar E. Pol, Jun 09 2009

Programs

  • Mathematica
    CoefficientList[Series[Product[1+2x^(2^k-1)+2x^2^k,{k,10}],{x,0,80}],x] (* Harvey P. Dale, Oct 07 2020 *)

A151689 a(n) = sum_{k >= 1} 2^wt(k) * binomial(wt(n+k),k).

Original entry on oeis.org

2, 6, 4, 6, 16, 16, 6, 6, 16, 16, 18, 40, 50, 30, 8, 6, 16, 16, 18, 40, 50, 30, 20, 40, 50, 54, 100, 142, 112, 48, 10, 6, 16, 16, 18, 40, 50, 30, 20, 40, 50, 54, 100, 142, 112, 48, 22, 40, 50, 54, 100, 142, 112, 72, 102, 142, 160, 256, 386, 368, 210, 70, 12, 6, 16, 16, 18, 40, 50
Offset: 0

Views

Author

N. J. A. Sloane, Jun 04 2009

Keywords

Crossrefs

Programs

  • Maple
    wt := proc(n) local w,m,i;
    w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end:
    f := n->add( 2^k*binomial(wt(n+k),k),k=1..20 );
Showing 1-10 of 10 results.