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!)
A097592 Triangle read by rows: T(n,k) is the number of permutations of [n] with exactly k increasing runs of even length. 18

%I #28 Jul 04 2019 03:42:12

%S 1,1,1,1,2,4,7,12,5,25,52,43,102,299,258,61,531,1750,1853,906,3141,

%T 11195,15634,8965,1385,20218,83074,133697,94398,31493,146215,675304,

%U 1207256,1088575,460929,50521,1174889,5880354,11974457,12625694,6632158

%N Triangle read by rows: T(n,k) is the number of permutations of [n] with exactly k increasing runs of even length.

%C Row n has 1+floor(n/2) entries.

%H Alois P. Heinz, <a href="/A097592/b097592.txt">Rows n = 0..180, flattened</a>

%F E.g.f.: 2(t-1)u/[ -2u+(2-t+tu)exp((-1+u)x/2)+(t-2+tu)exp(-(1+u)x/2)], where u=sqrt(5-4t).

%F Sum_{k=1..floor(n/2)} k * T(n,k) = A097593(n). - _Alois P. Heinz_, Jul 04 2019

%e Triangle starts:

%e 1;

%e 1;

%e 1, 1;

%e 2, 4;

%e 7, 12, 5;

%e 25, 52, 43;

%e 102, 299, 258, 61;

%e Example: T(4,2) = 5 because we have 13/24, 14/23, 23/14, 24/13 and 34/12.

%p G:=2*(t-1)*u/(-2*u+(2-t+t*u)*exp((-1+u)*x/2)+(t-2+t*u)*exp(-(1+u)*x/2)): u:=sqrt(5-4*t): Gser:=simplify(series(G,x=0,12)): P[0]:=1: for n from 1 to 11 do P[n]:=sort(n!*coeff(Gser,x^n)) od: seq(seq(coeff(t*P[n],t^k),k=1..1+floor(n/2)),n=0..11);

%p # second Maple program:

%p b:= proc(u, o, t) option remember; `if`(u+o=0, x^t, expand(

%p add(b(u+j-1, o-j, irem(t+1, 2)), j=1..o)+

%p add(b(u-j, o+j-1, 0)*x^t, j=1..u)))

%p end:

%p T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):

%p seq(T(n), n=0..12); # _Alois P. Heinz_, Nov 19 2013

%t b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, x^t, Expand[Sum[b[u+j-1, o-j, Mod[t+1, 2]], {j, 1, o}] + Sum[b[u-j, o+j-1, 0]*x^t, {j, 1, u}]]]; T[n_] := Function[ {p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0, 0]]; Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Apr 29 2015, after _Alois P. Heinz_ *)

%Y Columns k=0-10 give: A097597, A317281, A317282, A317283, A317284, A317285, A317286, A317287, A317288, A317289, A317290.

%Y Row sums give A000142.

%Y T(n,floor(n/2)) gives A317139.

%Y T(2n,n) gives A000364.

%Y T(2n+1,n) gives A317140.

%Y Cf. A097591, A097593.

%K nonn,tabf

%O 0,5

%A _Emeric Deutsch_, Aug 29 2004

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.)