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.

A128612 Triangle T(n,k) read by rows: number of permutations in [n] with exactly k ascents that have an even number of inversions.

This page as a plain text file.
%I A128612 #32 Mar 28 2025 13:03:03
%S A128612 1,0,1,0,2,1,1,5,5,1,1,14,30,14,1,0,28,155,147,29,1,0,56,605,1208,586,
%T A128612 64,1,1,127,2133,7819,7819,2133,127,1,1,262,7288,44074,78190,44074,
%U A128612 7288,262,1,0,496,23947,227623,655039,655315,227569,23893,517,1,0,992,76305,1102068,4868556,7862124,4869558,1101420,76332,1044,1
%N A128612 Triangle T(n,k) read by rows: number of permutations in [n] with exactly k ascents that have an even number of inversions.
%H A128612 Alois P. Heinz, <a href="/A128612/b128612.txt">Rows n = 1..141, flattened</a>
%H A128612 Jason Fulman, Gene B. Kim, Sangchul Lee, and T. Kyle Petersen, <a href="https://arxiv.org/abs/1910.04258">On the joint distribution of descents and signs of permutations</a>, arXiv:1910.04258 [math.CO], 2019.
%H A128612 S. Tanimoto, <a href="http://arXiv.org/abs/math.CO/0602263">A new approach to signed Eulerian numbers</a>, arXiv:math/0602263 [math.CO], 2006.
%F A128612 T(n,k) = (1/2) * (A008292(n,n-k) + A049061(n,n-k)), n>=1, 0<=k<n. - _R. J. Mathar_, Nov 01 2007
%e A128612 Triangle starts:
%e A128612   1;
%e A128612   0,   1;
%e A128612   0,   2,    1;
%e A128612   1,   5,    5,    1;
%e A128612   1,  14,   30,   14,    1;
%e A128612   0,  28,  155,  147,   29,    1;
%e A128612   0,  56,  605, 1208,  586,   64,   1;
%e A128612   1, 127, 2133, 7819, 7819, 2133, 127, 1;
%e A128612   ...
%p A128612 A008292 := proc(n,k) local j; add( (-1)^j*(k-j)^n*binomial(n+1,j),j=0..k) ; end: A049061 := proc(n,k) if k <= 0 or n <=0 or k > n then 0; elif n = 1 then 1 ; elif n mod 2 = 0 then A049061(n-1,k)-A049061(n-1,k-1) ; else k*A049061(n-1,k)+(n-k+1)*A049061(n-1,k-1) ; fi ; end: A128612 := proc(n,k) (A008292(n,n-k)+A049061(n,n-k))/2 ; end: for n from 1 to 11 do for k from 0 to n-1 do printf("%d,",A128612(n,k)) ; od: od: # _R. J. Mathar_, Nov 01 2007
%p A128612 # second Maple program:
%p A128612 b:= proc(u, o, i) option remember; expand(`if`(u+o=0, 1-i,
%p A128612        add(b(u+j-1, o-j, irem(i+u+j-1, 2)), j=1..o)*x+
%p A128612        add(b(u-j, o+j-1, irem(i+u-j, 2)), j=1..u)))
%p A128612     end:
%p A128612 T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b(n, 0$2)):
%p A128612 seq(T(n), n=1..14);  # _Alois P. Heinz_, May 02 2017
%t A128612 b[u_, o_, i_] := b[u, o, i] = Expand[If[u + o == 0, 1 - i, Sum[b[u + j - 1, o - j, Mod[i + u + j - 1, 2]], {j, 1, o}]*x + Sum[b[u - j, o + j - 1, Mod[i + u - j, 2]], {j, 1, u}]]];
%t A128612 T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n-1}]][b[n, 0,0]];
%t A128612 Table[T[n], {n, 1, 14}] // Flatten (* _Jean-François Alcover_, Jul 25 2017, after _Alois P. Heinz_ *)
%Y A128612 Cf. A008292, A049061, A128613.
%Y A128612 Cf. A145882 (similar with rows reversed).
%Y A128612 Row sums give A001710.
%Y A128612 T(2n,n) gives A382309.
%K A128612 nonn,tabl
%O A128612 1,5
%A A128612 _Ralf Stephan_, May 08 2007
%E A128612 More terms from _R. J. Mathar_, Nov 01 2007