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-5 of 5 results.

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).

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

Original entry on oeis.org

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, 7, 8, 9, 12, 14, 11, 6, 5, 7, 8, 9, 12, 14, 12, 10, 12, 15, 17, 21, 26, 25, 16, 6, 2, 3, 4, 4, 5, 7, 7, 5, 5, 7, 8, 9, 12, 14, 11, 6, 5, 7, 8, 9, 12, 14, 12, 10, 12, 15, 17, 21, 26
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2009

Keywords

Examples

			If formatted as a triangle:
.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,7,8,9,12,14,11,6,5,7,8,9,12,14,12,10,12,15,17,21,26,25,16,6,2,
.3,4,4,5,7,7,5,5,7,8,9,12,14,11,6,5,7,8,9,12,14,12,10,12,15,17,21,26,25,16,7
... 5,7,8,9,12,14,12,10,12,15,17,21,26,25,17,11,12,15,17,21,26,26,22,22,27,32,38,47,51,41,22,7,2,
.3,4,4,5,7,7,4,2, ...
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+x)Product[1+x^(2^n-1)+x^2^n,{n,10}],{x,0,100}],x] (* Harvey P. Dale, Jul 13 2019 *)
    a[n_] := Sum[If[OddQ[n + k], Binomial[DigitCount[n + k, 2, 1], k], 0], {k, 0, 2*Floor[Log2[n + 1]] + 1}]; Array[a, 92, 0] (* Amiram Eldar, Jul 29 2023 *)

Formula

Recurrence: a(0)=1, a(1) = a(2) = 2; a(2^m-1)=2 for m >= 2; a(2^m) = 3 for m >= 2; a(2^m-2) = m for m >= 3; otherwise, for m >= 5, if m=2^i+j (0 <= j < 2^i - 1), a(m) = a(j) + a(j+1).
a(n) = Sum_{k>=0, n+k odd} binomial(A000120(n+k),k); the sum may be restricted further to k <= 2*A000523(n+1)+1 [based on Hagen von Eitzen's formula for A151552]. [corrected by Amiram Eldar, Jul 29 2023]

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

Original entry on oeis.org

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, 33, 5, 10, 13, 15, 20, 32, 33, 23, 20, 33, 41, 50, 72, 96, 81, 39, 20, 33, 41, 50, 72, 97, 89, 66, 73, 107, 132, 172, 240, 272, 192, 65, 5, 10, 13, 15, 20, 32, 33, 23
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2009

Keywords

Comments

From Gary W. Adamson, May 25 2009: (Start)
Convolved with A078008 signed (A151575) [1, 0, 2, -2, 6, -10, 22, -42, 86, -170, ...]
equals the toothpick sequence A153006: (1, 3, 6, 9, 13, 20, 28, ...). (End)
If A151550 is written as a triangle then the rows converge to this sequence. - N. J. A. Sloane, Jun 16 2009

Examples

			From _Omar E. Pol_, Jun 19 2009: (Start)
May be written as a triangle:
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,33;
5,10,13,15,20,32,33,23,20,33,41,50,72,96,81,39,20,33,41,50,72,97,89,66,73,...
(End)
		

Crossrefs

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

Original entry on oeis.org

1, 3, 3, 3, 4, 6, 5, 3, 4, 6, 6, 7, 10, 11, 7, 3, 4, 6, 6, 7, 10, 11, 8, 7, 10, 12, 13, 17, 21, 18, 9, 3, 4, 6, 6, 7, 10, 11, 8, 7, 10, 12, 13, 17, 21, 18, 10, 7, 10, 12, 13, 17, 21, 19, 15, 17, 22, 25, 30, 38, 39, 27, 11, 3, 4, 6, 6, 7, 10, 11, 8, 7, 10, 12, 13, 17, 21, 18, 10, 7, 10, 12, 13
Offset: 0

Views

Author

N. J. A. Sloane, May 20 2009

Keywords

Crossrefs

Showing 1-5 of 5 results.