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.
%I A145876 #79 Jan 05 2025 19:51:39 %S A145876 1,1,1,2,2,2,5,7,7,5,16,26,36,26,16,61,117,182,182,117,61,272,594, %T A145876 1056,1196,1056,594,272,1385,3407,6669,8699,8699,6669,3407,1385,7936, %U A145876 21682,46348,67054,76840,67054,46348,21682,7936,50521,151853,350240,556952,704834,704834,556952,350240,151853,50521 %N A145876 Triangle read by rows: T(n,k) is the number of permutations of [n] having k-1 alternating descents (1<=k<=n). The index i is an alternating descent of a permutation p if either i is odd and p(i)>p(i+1), or i is even and p(i)<p(i+1). %C A145876 Row sums are the factorials (A000142). %C A145876 T(n,1) = T(n,n) = A000111(n) (Euler or up-down numbers). %C A145876 Sum(k*T(n,k), k=1..n) = (n+1)!/2 = A001710(n+1). %C A145876 From _Peter Bala_, Jun 11 2011: (Start) %C A145876 Koutras has defined generalized Eulerian numbers associated with a sequence of polynomials - the ordinary Eulerian numbers A008292 being associated with the sequence of monomials x^n. The present array is the triangle of Eulerian numbers associated with the sequence of zigzag polynomials Z(n,x) defined in A147309. %C A145876 See A109449, A147315 and A185424 for the respective analogs of the Pascal triangle, the Stirling numbers of the second kind and the Bernoulli numbers, associated with the sequence of zigzag polynomials. (End) %C A145876 From _Vaclav Kotesovec_, Apr 29 2018: (Start) %C A145876 In general, for fixed k>=1, T(n,k) ~ (4-Pi)^(k-1) * 2^(n+2) * n^(k-1) * n! / ((k-1)! * Pi^(n + k)). %C A145876 Equivalently, for fixed k>=1, T(n,k) ~ (4-Pi)^(k-1) * 2^(n + 5/2) * n^(n + k - 1/2) / ((k-1)! * Pi^(n + k - 1/2) * exp(n)). (End) %H A145876 Alois P. Heinz, <a href="/A145876/b145876.txt">Table of n, a(n) for n = 1..141, flattened</a> %H A145876 D. Chebikin, <a href="https://doi.org/10.37236/856">Variations on descents and inversions in permutations</a>, The Electronic J. of Combinatorics, 15 (2008), #R132. %H A145876 M. V. Koutras, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/32-1/koutras.pdf">Eulerian numbers associated with sequences of polynomials</a>, The Fibonacci Quarterly, 32 (1994), 44-57. %H A145876 Shi-Mei Ma, Qi Fang, Toufik Mansour, and Yeong-Nan Yeh, <a href="https://arxiv.org/abs/2104.09374">Alternating Eulerian polynomials and left peak polynomials</a>, arXiv:2104.09374 [math.CO], 2021. %H A145876 S.-M. Ma and Y.-M. Yeh, <a href="https://doi.org/10.1016/j.disc.2015.12.007">Enumeration of permutations by number of alternating descents</a>, Discr. Math., 339 (2016), 1362-1367. %F A145876 E.g.f.: F(t,u) = t*(1-tan(u*(t-1))-sec(u*(t-1)))/(tan(u*(t-1))+sec(u*(t-1))-t). %F A145876 From _Peter Bala_, Jun 11 2011: (Start) %F A145876 T(n,k) = Sum_{j = 0..k} (-1)^(k-j)*binomial(n+1,k-j)*Z(n,j), where Z(n,x) are the zigzag polynomials defined in A147309. %F A145876 Let M denote the triangular array A109449. The first column of the array (I-x*M)^-1 is a sequence of rational functions in x whose numerator polynomials are the row polynomials of the present array. %F A145876 (End) %F A145876 From _Vladimir Shevelev_, Jul 01 2011: (Start) %F A145876 a(2^(2*n-1)-2^(n-1)+1) == 1 (mod 2^n). %F A145876 If n is odd prime, then a(2*n^2-n+1) == 1 (mod 2*n) and a((n^2-n+2)/2) == (-1)^((n-1)/2). %F A145876 (End) %e A145876 T(4,3) = 7 because we have 1243, 4123, 1342, 3124, 2134, 2341 and 4321. For example, for p=1342 the alternating descent is {2,3}; indeed, 2 is even and p(2)=3 < p(3)=4, while 3 is odd and p(3)=4 > p(4)=2. %e A145876 Triangle starts: %e A145876 1; %e A145876 1, 1; %e A145876 2, 2, 2; %e A145876 5, 7, 7, 5; %e A145876 16, 26, 36, 26, 16; %e A145876 61, 117, 182, 182, 117, 61; %e A145876 272, 594, 1056, 1196, 1056, 594, 272; %e A145876 1385, 3407, 6669, 8699, 8699, 6669, 3407, 1385; %e A145876 ... %p A145876 F:=t*(1-tan(u*(t-1))-sec(u*(t-1)))/(tan(u*(t-1))+sec(u*(t-1))-t): Fser:= simplify(series(F,u=0,12)): for n from 0 to 10 do P[n]:=sort(expand(factorial(n)*coeff(Fser,u,n))) end do: for n to 10 do seq(coeff(P[n],t,j),j=1..n) end do; # yields sequence in triangular form %p A145876 # second Maple program: %p A145876 b:= proc(u, o) option remember; expand(`if`(u+o=0, 1, %p A145876 add(b(o+j-1, u-j)*x, j=1..u)+ %p A145876 add(b(o-j, u-1+j), j=1..o))) %p A145876 end: %p A145876 T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(n, 0)): %p A145876 seq(T(n), n=1..12); # _Alois P. Heinz_, Nov 18 2013, Apr 15 2018 %t A145876 b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1, Expand[ %t A145876 Sum[b[u+j-1, o-j, !t]*If[t, 1, x], {j, 1, o}] + %t A145876 Sum[b[u-j, o+j-1, !t]*If[t, x, 1], {j, 1, u}]]]; %t A145876 T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n-1}]][b[0, n, True]]; %t A145876 Table[T[n], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, Feb 19 2015, after _Alois P. Heinz_ *) %Y A145876 Cf. A000142, A001710, A008292, A109449, A147315, A185424. %Y A145876 Columns k=1-10 give: A000111, A302691, A302895, A302896, A302897, A302898, A302899, A302900, A302901, A302902. %Y A145876 Cf. A302903 (T(2n+1,n+1)), A302904 (T(2n,n)), A302905 (T(n,ceiling(n/2))). %K A145876 nonn,tabl %O A145876 1,4 %A A145876 _Emeric Deutsch_, Oct 22 2008