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
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).
Sum_{k=1..floor(n/2)} k * T(n,k) = A097593(n). - Alois P. Heinz, Jul 04 2019
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)):
seq(T(n), n=0..12); # Alois P. Heinz, Nov 19 2013
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
Row sums give A000142.
T(n,floor(n/2)) gives A317139.
T(2n,n) gives A000364.
T(2n+1,n) gives A317140.
Sequence in context: A259588 A058103 A346268 * A267699 A193841 A052474
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Aug 29 2004
STATUS
approved

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 23 13:51 EDT 2024. Contains 371914 sequences. (Running on oeis4.)