|
|
A097592
|
|
Triangle read by rows: T(n,k) is the number of permutations of [n] with exactly k increasing runs of even length.
|
|
18
|
|
|
1, 1, 1, 1, 2, 4, 7, 12, 5, 25, 52, 43, 102, 299, 258, 61, 531, 1750, 1853, 906, 3141, 11195, 15634, 8965, 1385, 20218, 83074, 133697, 94398, 31493, 146215, 675304, 1207256, 1088575, 460929, 50521, 1174889, 5880354, 11974457, 12625694, 6632158
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
COMMENTS
|
Row n has 1+floor(n/2) entries.
|
|
LINKS
|
|
|
FORMULA
|
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).
|
|
EXAMPLE
|
Triangle starts:
1;
1;
1, 1;
2, 4;
7, 12, 5;
25, 52, 43;
102, 299, 258, 61;
Example: T(4,2) = 5 because we have 13/24, 14/23, 23/14, 24/13 and 34/12.
|
|
MAPLE
|
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);
# second Maple program:
b:= proc(u, o, t) option remember; `if`(u+o=0, x^t, expand(
add(b(u+j-1, o-j, irem(t+1, 2)), j=1..o)+
add(b(u-j, o+j-1, 0)*x^t, j=1..u)))
end:
T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
|
|
MATHEMATICA
|
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 *)
|
|
CROSSREFS
|
Columns k=0-10 give: A097597, A317281, A317282, A317283, A317284, A317285, A317286, A317287, A317288, A317289, A317290.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|