%I #33 Apr 18 2020 09:36:14
%S 1,1,2,4,8,15,28,52,96,177,326,600,1104,2032,3740,6884,12672,23327,
%T 42942,79052,145528,267905,493192,907928,1671424,3076959,5664436,
%U 10427772,19196688,35339553,65057260,119765152,220477952,405882064,747196026,1375527404
%N Number of valley-avoiding compositions with positive parts.
%H Alois P. Heinz, <a href="/A128805/b128805.txt">Table of n, a(n) for n = 0..1000</a>
%H S. Heubach and T. Mansour, <a href="https://arxiv.org/abs/math/0603285">Enumeration of 3-letter patterns in combinations</a>, arXiv:math/0603285 [math.CO], 2006.
%H Milan Janjic, <a href="http://www.pmfbl.org/janjic/">Enumerative Formulas for Some Functions on Finite Sets</a>
%F The Heubach/Mansour paper has a complicated g.f.
%p b:= proc(n, t, l) option remember; `if`(n=0, 1, add(
%p b(n-j, is(j<l), j), j=1..min(n, `if`(t, l, n))))
%p end:
%p a:= n-> b(n, false, 0):
%p seq(a(n), n=0..40); # _Alois P. Heinz_, Oct 24 2017
%t b[n_, t_, l_] := b[n, t, l] = If[n == 0, 1, Sum[b[n - j, j < l, j], {j, 1, Min[n, If[t, l, n]]}]];
%t a[n_] := b[n, False, 0];
%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Nov 11 2017, after _Alois P. Heinz_ *)
%t nmax = 50; CoefficientList[Series[1/(1 - Sum[x^((k + 1)^2)/Product[(1 - x^j), {j, 1, 2*k + 1}], {k, 0, Sqrt[nmax]}]/(1 + Sum[x^(k*(k + 2))/Product[(1 - x^j), {j, 1, 2*k}], {k, 1, Sqrt[nmax]}])), {x, 0, nmax}], x] (* _Vaclav Kotesovec_, Apr 18 2020 *)
%Y Cf. A128768.
%K nonn
%O 0,3
%A _Ralf Stephan_, May 08 2007
%E More terms from _Vladeta Jovovic_, Oct 04 2007
|