cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A145883 Triangle read by rows: T(n,k) is the number of odd permutations of {1,2,...,n} having k descents. (n>=1, k>=1).

This page as a plain text file.
%I A145883 #22 Oct 03 2024 05:40:28
%S A145883 0,1,2,1,6,6,12,36,12,28,155,147,29,1,56,605,1208,586,64,1,120,2160,
%T A145883 7800,7800,2160,120,240,7320,44160,78000,44160,7320,240,496,23947,
%U A145883 227623,655039,655315,227569,23893,517,1,992,76305,1102068,4868556
%N A145883 Triangle read by rows: T(n,k) is the number of odd permutations of {1,2,...,n} having k descents. (n>=1, k>=1).
%C A145883 Number of entries in row n is ceiling(binomial(n,2)/2) - ceiling(binomial(n-2,2)/2).
%C A145883 Sum of entries in row n is A001710(n) for n>=2.
%H A145883 Alois P. Heinz, <a href="/A145883/b145883.txt">Rows n = 1..143, flattened</a>
%H A145883 J. Shareshian and M. L. Wachs, <a href="https://doi.org/10.1090/S1079-6762-07-00172-2">q-Eulerian polynomials: excedance number and major index</a>, Electronic Research Announcements of the Amer. Math. Soc., 13 (2007), 33-45.
%H A145883 R. P. Stanley, <a href="http://dx.doi.org/10.1016/0097-3165(76)90028-5">Binomial posets, Möbius inversion and permutation enumeration</a>, J. Combinat. Theory, A 20 (1976), 336-356.
%H A145883 S. Tanimoto, <a href="http://www.emis.de/journals/INTEGERS/papers/g31/g31.Abstract.html">A study of Eulerian numbers for permutations in the alternating group</a>, Integers, Electronic J. of Combinatorial Number Theory, 6 (2006), #A31.
%F A145883 In the Shareshian and Wachs reference (p. 35) a q-analog of the exponential g.f. of the Eulerian polynomials is given for the joint distribution of (inv, des) (see also the Stanley reference). The first Maple program given below makes use of this function by considering its odd part.
%F A145883 T(n,k) = (euler(n,k) - Sum_{j=max(0, k+1-ceiling(n/2))..min(floor(n/2), k)} binomial(j-1-floor(n/2), j) * euler(ceiling(n/2), k-j)) / 2, where euler(n,k) is the Eulerian number A173018 (not A008292, which has different indexing). - _Robert A. Russell_, Nov 16 2018
%e A145883 T(4,2) = 6 because we have 1432, 3142, 3214, 4312, 4231 and 3421.
%e A145883 Triangle begins with T(1,1):
%e A145883     0
%e A145883     1
%e A145883     2     1
%e A145883     6     6
%e A145883    12    36      12
%e A145883    28   155     147      29       1
%e A145883    56   605    1208     586      64       1
%e A145883   120  2160    7800    7800    2160     120
%e A145883   240  7320   44160   78000   44160    7320     240
%e A145883   496 23947  227623  655039  655315  227569   23893   517    1
%e A145883   992 76305 1102068 4868556 7862124 4869558 1101420 76332 1044 1
%p A145883 for n to 11 do qbr := proc (m) options operator, arrow; sum(q^i, i = 0 .. m-1) end proc; qfac := proc (m) options operator, arrow; product(qbr(j), j = 1 .. m) end proc; Exp := proc (z) options operator, arrow; sum(q^binomial(m, 2)*z^m/qfac(m), m = 0 .. 19) end proc; g := (1-t)/(Exp(z*(t-1))-t); gser := simplify(series(g, z = 0, 17)); a[n] := simplify(qfac(n)*coeff(gser, z, n)); b[n] := (a[n]-subs(q = -q, a[n]))*1/2; P[n] := sort(subs(q = 1, b[n])) end do; 0; for n to 11 do seq(coeff(P[n], t, j), j = 1 .. ceil((1/2)*binomial(n, 2))-ceil((1/2)*binomial(n-2, 2))) end do; # yields sequence in triangular form
%p A145883 # second Maple program:
%p A145883 b:= proc(u, o, t) option remember; `if`(u+o=0, t, expand(
%p A145883        add(b(u+j-1, o-j, irem(t+j-1+u, 2)), j=1..o)+
%p A145883        add(b(u-j, o+j-1, irem(t+u-j, 2))*x, j=1..u)))
%p A145883     end:
%p A145883 T:= n->`if`(n=1, 0, (p->seq(coeff(p, x, i), i=1..degree(p)))
%p A145883        (add(b(j-1, n-j, irem(j+1, 2)), j=1..n))):
%p A145883 seq(T(n), n=1..12);  # _Alois P. Heinz_, Nov 19 2013
%t A145883 b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, t, Expand[Sum[b[u+j-1, o-j, Mod[t+j-1+u, 2]], {j, 1, o}] + Sum[b[u-j, o+j-1, Mod[t+u-j, 2]]*x, {j, 1, u}]]]; T[n_] := If[n == 1, 0, Function[{p}, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][Sum[ b[j-1, n-j, Mod[j+1, 2]], {j, 1, n}]]]; Table[T[n], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, May 28 2015, after _Alois P. Heinz_ *)
%t A145883 Needs["Combinatorica`"];
%t A145883 Join[{0}, Table[(Eulerian[n, k] - Sum[Binomial[j-1-Floor[n/2], j] Eulerian[Ceiling[n/2], k-j], {j, Max[0, k+1-Ceiling[n/2]], Min[Floor[n/2], k]}])/2, {n, 2, 15}, {k, 1, n}] // Flatten // DeleteCases[0]] (* _Robert A. Russell_, Nov 16 2018 *)
%Y A145883 Cf. A001710, A145882.
%K A145883 nonn,tabf
%O A145883 1,3
%A A145883 _Emeric Deutsch_, Nov 11 2008