login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A128768 Number of peak-avoiding compositions with positive parts. 2

%I #22 Apr 18 2020 07:13:11

%S 1,1,2,4,7,13,22,38,64,107,177,293,481,789,1291,2110,3445,5621,9167,

%T 14947,24366,39716,64732,105500,171941,280220,456687,744280,1212984,

%U 1976850,3221762,5250655,8557248,13946172,22728787,37042274,60369723,98387696,160347599

%N Number of peak-avoiding compositions with positive parts.

%H Alois P. Heinz, <a href="/A128768/b128768.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.

%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=max(1, `if`(t, l, 1))..n))

%p end:

%p a:= n-> b(n, false, n):

%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, Max[1, If[t, l, 1]], n}]];

%t a[n_] := b[n, False, n];

%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^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 *)

%Y Cf. A128805.

%K nonn

%O 0,3

%A _Ralf Stephan_, May 08 2007

%E More terms from _Vladeta Jovovic_, Oct 04 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 04:58 EDT 2024. Contains 370952 sequences. (Running on oeis4.)