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 A316391 #5 Jul 01 2018 13:43:23 %S A316391 1,4,62,340,4734,33855,495371,4403025,70083872,746704117,13023762276, %T A316391 161905131484,3091115525637,43928623624790,914530883776894, %U A316391 14623431780216366,330413968185491070,5870376151413374683,143271256595612492851,2799645366893284489691 %N A316391 Number of permutations p of [n] such that the up-down signature of 0,p has nonnegative partial sums with a maximal value of four. %H A316391 Alois P. Heinz, <a href="/A316391/b316391.txt">Table of n, a(n) for n = 4..455</a> %F A316391 a(n) = A262166(n) - A262165(n). %p A316391 b:= proc(u, o, c, k) option remember; %p A316391 `if`(c<0 or c>k, 0, `if`(u+o=0, 1, %p A316391 add(b(u-j, o-1+j, c+1, k), j=1..u)+ %p A316391 add(b(u+j-1, o-j, c-1, k), j=1..o))) %p A316391 end: %p A316391 a:= n-> b(n, 0$2, 4)-b(n, 0$2, 3): %p A316391 seq(a(n), n=4..23); %Y A316391 Column k=4 of A258829. %Y A316391 Cf. A262165, A262166. %K A316391 nonn %O A316391 4,2 %A A316391 _Alois P. Heinz_, Jul 01 2018