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 A162980 #13 Jul 24 2018 09:40:22 %S A162980 1,0,1,0,0,1,1,1,2,2,1,6,6,3,1,22,22,12,4,1,102,102,51,15,2,506,506, %T A162980 264,88,19,2,2952,2952,1476,458,89,9,18502,18502,9504,3168,726,110,9, %U A162980 131112,131112,65556,20868,4479,621,44,991226,991226,504864,168288,39696,6672,749,44 %N A162980 Triangle read by rows: T(n,k) is the number of reverse alternating (i.e., up-down) permutations of {1,2,...,n} having k fixed points (n >= 0, 0 <= k <= 1 + floor(n/2)). %C A162980 Row n has 2 + floor(n/2) entries (n>=5). %C A162980 Sum of entries in row n is the Euler (up-down) number A000111(n). %C A162980 T(n,0) = T(n,1) = A129815(n) (n>=1). %C A162980 T(2n-1,n) = T(2n,n+1) = d(n-1), where d(n) = A000166 is a derangement number (see the Chapman & Williams reference). %C A162980 Sum_{k>=0} k*T(n,k) = A162977(n). %H A162980 R. Chapman and L. K. Williams, <a href="http://www.combinatorics.org/ojs/index.php/eljc/article/view/v14i1n16">A conjecture of Stanley on alternating permutations</a>, The Electronic J. of Combinatorics, 14, 2007, #N16. %H A162980 R. P. Stanley, <a href="https://dx.doi.org/10.1016/j.jcta.2006.06.008">Alternating permutations and symmetric functions</a>, J. Comb. Theory A 114 (3) (2007) 436-460. %F A162980 The row generating polynomials can be obtained from Proposition 6.1 of the Stanley reference (see the Maple program). %e A162980 T(5,2)=3 because we have 15243, 14352, and 25341. %e A162980 Triangle starts: %e A162980 1; %e A162980 0, 1; %e A162980 0, 0, 1; %e A162980 1, 1; %e A162980 2, 2, 1; %e A162980 6, 6, 3, 1; %e A162980 22, 22, 12, 4, 1; %e A162980 102, 102, 51, 15, 2; %p A162980 fo := exp(E*(arctan(q*t)-arctan(t)))/(1-E*t): fe := sqrt((1+q^2*t^2)/(1+t^2))*exp(E*(arctan(q*t)-arctan(t)))/(1-E*t): foser := simplify(series(fo, t = 0, 18)): feser := simplify(series(fe, t = 0, 18)): Q := proc (n) if `mod`(n, 2) = 1 then coeff(foser, t, n) else coeff(feser, t, n) end if end proc: for n from 0 to 16 do Q(n) end do: g := sec(x)+tan(x): gser := series(g, x = 0, 20): for n from 0 to 18 do a[n] := factorial(n)*coeff(gser, x, n) end do: for n from 0 to 15 do P[n] := sort(subs({E = a[1], E^2 = a[2], E^3 = a[3], E^4 = a[4], E^5 = a[5], E^6 = a[6], E^7 = a[7], E^8 = a[8], E^9 = a[9], E^10 = a[10], E^11 = a[11], E^12 = a[12], E^13 = a[13], E^14 = a[14], E^15 = a[15], E^16 = a[16]}, Q(n))) end do: 1; 0, 1; 0, 0, 1; 1, 1; 2, 2, 1; for n from 5 to 13 do seq(coeff(P[n], q, j), j = 0 .. 1+floor((1/2)*n)) end do; %t A162980 nmax = 10; %t A162980 fo = Exp[e*(ArcTan[q*t] - ArcTan[t])]/(1 - e*t); %t A162980 fe = Sqrt[(1+q^2 t^2)/(1+t^2)]*Exp[e*(ArcTan[q*t] - ArcTan[t])]/(1-e*t); %t A162980 Q[n_] := If[OddQ[n], SeriesCoefficient[fo, {t, 0, n}], SeriesCoefficient[fe, {t, 0, n}]] // Expand; %t A162980 b[n_] := n!*SeriesCoefficient[Sec[x] + Tan[x], {x, 0, n}]; %t A162980 P[n_] := (Q[n] /. e^k_Integer :> b[k]) /. e :> b[1] // Expand; %t A162980 T[n_, k_] := Coefficient[P[n], q, k]; %t A162980 Table[CoefficientList[P[n], q], {n, 0, nmax}] // Flatten (* _Jean-François Alcover_, Jul 24 2018, from Maple *) %Y A162980 Cf. A000111, A000166, A129815, A162977, A162979. %K A162980 nonn,tabf %O A162980 0,9 %A A162980 _Emeric Deutsch_, Aug 06 2009