login
A128768
Number of peak-avoiding compositions with positive parts.
2
1, 1, 2, 4, 7, 13, 22, 38, 64, 107, 177, 293, 481, 789, 1291, 2110, 3445, 5621, 9167, 14947, 24366, 39716, 64732, 105500, 171941, 280220, 456687, 744280, 1212984, 1976850, 3221762, 5250655, 8557248, 13946172, 22728787, 37042274, 60369723, 98387696, 160347599
OFFSET
0,3
LINKS
S. Heubach and T. Mansour, Enumeration of 3-letter patterns in combinations, arXiv:math/0603285 [math.CO], 2006.
FORMULA
The Heubach/Mansour paper has a complicated g.f.
MAPLE
b:= proc(n, t, l) option remember; `if`(n=0, 1, add(
b(n-j, is(j>l), j), j=max(1, `if`(t, l, 1))..n))
end:
a:= n-> b(n, false, n):
seq(a(n), n=0..40); # Alois P. Heinz, Oct 24 2017
MATHEMATICA
b[n_, t_, l_] := b[n, t, l] = If[n == 0, 1, Sum[b[n - j, j > l, j], {j, Max[1, If[t, l, 1]], n}]];
a[n_] := b[n, False, n];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 11 2017, after Alois P. Heinz *)
nmax = 50; CoefficientList[Series[1/(1 - Sum[x^(k^2+3*k+1)/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 *)
CROSSREFS
Cf. A128805.
Sequence in context: A188920 A281362 A319111 * A235607 A254007 A372782
KEYWORD
nonn
AUTHOR
Ralf Stephan, May 08 2007
EXTENSIONS
More terms from Vladeta Jovovic, Oct 04 2007
STATUS
approved