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.

A211164 Number of compositions of n with at most one odd part.

Original entry on oeis.org

1, 1, 1, 3, 2, 8, 4, 20, 8, 48, 16, 112, 32, 256, 64, 576, 128, 1280, 256, 2816, 512, 6144, 1024, 13312, 2048, 28672, 4096, 61440, 8192, 131072, 16384, 278528, 32768, 589824, 65536, 1245184, 131072, 2621440, 262144, 5505024, 524288, 11534336, 1048576, 24117248
Offset: 0

Views

Author

Alois P. Heinz, Jan 30 2013

Keywords

Examples

			a(3) = 3: [3], [1,2], [2,1].
a(4) = 2: [4], [2,2].
a(5) = 8: [5], [3,2], [2,3], [1,4], [4,1], [1,2,2], [2,1,2], [2,2,1].
a(6) = 4: [6], [4,2], [2,4], [2,2,2].
a(8) = 8: [8], [4,4], [2,6], [6,2], [2,2,4], [4,2,2], [2,4,2], [2,2,2,2].
		

Crossrefs

Bisection gives: A011782 (even part), A001792 (odd part).
Cf. A208354.

Programs

  • Maple
    a:= n-> `if`(n<2, 1, 2^iquo(n-2, 2) *
            `if`(irem(n, 2)=0, 1, iquo(n+3, 2))):
    seq(a(n), n=0..60);
  • PARI
    Vec((1-x)^2*(1+x)*(1+2*x)/(1-2*x^2)^2 + O(x^50)) \\ Colin Barker, May 07 2016

Formula

G.f.: -(2*x^4-x^3-3*x^2+x+1)/(-4*x^4+4*x^2-1).
From Colin Barker, May 07 2016: (Start)
a(n) = 2^((n-7)/2+5/2) for n>0 and even.
a(n) = 2^((n-7)/2)*(2*n+6) for n>0 and odd.
a(n) = 4*a(n-2)-4*a(n-4) for n>4.
(End)