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 A303697 #33 Nov 25 2024 05:00:18 %S A303697 1,1,1,0,1,1,1,2,1,1,1,4,5,4,5,4,1,1,11,19,19,20,19,19,11,1,1,26,82, %T A303697 100,101,100,101,100,82,26,1,1,57,334,580,619,619,620,619,619,580,334, %U A303697 57,1,1,120,1255,3394,4339,4420,4421,4420,4421,4420,4339,3394,1255,120,1 %N A303697 Number T(n,k) of permutations p of [n] whose difference between sum of up-jumps and sum of down-jumps equals k; triangle T(n,k), n>=0, min(0,1-n)<=k<=max(0,n-1), read by rows. %C A303697 An up-jump j occurs at position i in p if p_{i} > p_{i-1} and j is the index of p_i in the increasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are larger than p_{i-1}. A down-jump j occurs at position i in p if p_{i} < p_{i-1} and j is the index of p_i in the decreasingly sorted list of those elements in {p_{i}, ..., p_{n}} that are smaller than p_{i-1}. First index in the lists is 1 here. %H A303697 Alois P. Heinz, <a href="/A303697/b303697.txt">Rows n = 0..125, flattened</a> %F A303697 T(n,0) = A153229(n) for n > 0. %F A303697 T(n,1) = A005165(n-1) for n > 0. %F A303697 T(n+1,n-1) = A000295(n). %F A303697 T(n,k) = T(n,-k). %F A303697 Sum_{k=0..n-1} k^2 * T(n,k) = A001720(n+2) for n>1. %e A303697 Triangle T(n,k) begins: %e A303697 : 1 ; %e A303697 : 1 ; %e A303697 : 1, 0, 1 ; %e A303697 : 1, 1, 2, 1, 1 ; %e A303697 : 1, 4, 5, 4, 5, 4, 1 ; %e A303697 : 1, 11, 19, 19, 20, 19, 19, 11, 1 ; %e A303697 : 1, 26, 82, 100, 101, 100, 101, 100, 82, 26, 1 ; %e A303697 : 1, 57, 334, 580, 619, 619, 620, 619, 619, 580, 334, 57, 1 ; %p A303697 b:= proc(u, o) option remember; expand(`if`(u+o=0, 1, %p A303697 add(b(u-j, o+j-1)*x^(-j), j=1..u)+ %p A303697 add(b(u+j-1, o-j)*x^( j), j=1..o))) %p A303697 end: %p A303697 T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))( %p A303697 `if`(n=0, 1, add(b(j-1, n-j), j=1..n))): %p A303697 seq(T(n), n=0..12); %t A303697 b[u_, o_] := b[u, o] = Expand[If[u+o == 0, 1, %t A303697 Sum[b[u-j, o+j-1] x^-j, {j, 1, u}] + %t A303697 Sum[b[u+j-1, o-j] x^j, {j, 1, o}]]]; %t A303697 T[0] = {1}; %t A303697 T[n_] := x^n Sum[b[j-1, n-j], {j, 1, n}] // CoefficientList[#, x]& // Rest; %t A303697 T /@ Range[0, 12] // Flatten (* _Jean-François Alcover_, Feb 20 2021, after _Alois P. Heinz_ *) %Y A303697 Row sums give A000142. %Y A303697 Cf. A000295, A001720, A005165, A008292, A081285, A153229, A291680, A291684, A291722, A316292, A316293, A321316. %K A303697 nonn,tabf %O A303697 0,8 %A A303697 _Alois P. Heinz_, Apr 28 2018