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.

A271941 Number of peaks in all bargraphs having semiperimeter n (n>=2).

Original entry on oeis.org

1, 2, 5, 13, 36, 105, 317, 979, 3070, 9731, 31090, 99940, 322832, 1047007, 3407017, 11118165, 36370984, 119234791, 391620238, 1288394790, 4244993865, 14005026856, 46260856498, 152974164616, 506355410344, 1677603452621, 5562725698010, 18459595624048, 61301038293810, 203705244194997
Offset: 2

Views

Author

Emeric Deutsch, May 20 2016

Keywords

Examples

			a(4)=5 because each of the 5 (=A082582(4)) bargraphs of semiperimeter 4 (corresponding to the compositions [1,1,1],[1,2],[2,1],[2,2],[3]) has only 1 peak.
a(6)=36 because among the 35 (=A082582(6)) bargraphs of semiperimeter 6 only the one corresponding to the composition [2,1,2] has 2 peaks; 34*1 + 1* 2 = 36.
		

Crossrefs

Partial sums of A271941.

Programs

  • Maple
    g := (1/2)*z^2*((1+z^2)*sqrt(1-4*z+2*z^2+z^4)+1-4*z+2*z^2+z^4)/((1-z)^2*(1-3*z-z^2-z^3)): gser := series(g, z = 0, 40): seq(coeff(gser, z, n), n = 2 .. 35);

Formula

a(n) = Sum_{k>=1} k*A271940(n,k).
G.f.: z^2*((1+z^2)*sqrt(1-4z+2z^2+z^4)+1-4z+2z^2+z^4)/(2(1-3z-z^2-z^3)(1-z)^2).
(1-n)*a(n)-a(n+1)+(-4-3*n)*a(n+2)+(-2+4*n)*a(n+3)+(-9-3*n)*a(4+n)+(15+4*n)*a(n+5)+(-4-n)*a(n+6)+2 = 0. - Robert Israel, May 20 2016