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!)
A244715 Number of compositions of n with exactly 3 transitions between different parts. 2

%I #9 Aug 29 2021 04:32:54

%S 2,10,36,86,200,374,680,1122,1796,2694,3954,5600,7752,10448,13798,

%T 18072,23032,29218,36390,45044,54870,66852,79790,95550,112662,132938,

%U 154752,180614,207764,239784,273898,312922,354240,401826,451598,508134,567756,634634,705506

%N Number of compositions of n with exactly 3 transitions between different parts.

%H Alois P. Heinz, <a href="/A244715/b244715.txt">Table of n, a(n) for n = 6..900</a>

%p b:= proc(n, v) option remember; `if`(n=0, [1, 0$3],

%p add(`if`(v in [0, i], b(n-i, `if`(i<=n-i, i, -1)),

%p [0, b(n-i, `if`(i<=n-i, i, -1))[1..3][]]), i=1..n))

%p end:

%p a:= n-> b(n, 0)[4]:

%p seq(a(n), n=6..60);

%t b[n_, v_] := b[n, v] = If[n == 0, 1, Expand[Sum[b[n - i, i]*

%t If[v == 0 || v == i, 1, x], {i, n}]]];

%t a[n_] := Coefficient[b[n, 0], x, 3];

%t Table[a[n], {n, 6, 60}] (* _Jean-François Alcover_, Aug 29 2021, after A238279 Maple code *)

%Y Column k=3 of A238279.

%K nonn

%O 6,1

%A _Joerg Arndt_ and _Alois P. Heinz_, Jul 04 2014

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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)