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 A322294 #12 Sep 25 2019 03:30:23 %S A322294 1,1,2,4,10,48,120,888,2198,22120,54304,685368,1674468,25344480, %T A322294 61736880,1087931184,2644978110,53138966904,129019925424, %U A322294 2909014993080,7056278570108,176372774697856,427516982398576,11729862804913680,28417031969575260,848948339328178128 %N A322294 Number of permutations of [n] with exactly floor(n/2) rising or falling successions. %H A322294 Alois P. Heinz, <a href="/A322294/b322294.txt">Table of n, a(n) for n = 0..696</a> %F A322294 a(n) = A001100(n,floor(n/2)). %p A322294 S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2] %p A322294 [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2) %p A322294 -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4))) %p A322294 end: %p A322294 a:= n-> coeff(S(n),t,floor(n/2)): %p A322294 seq(a(n), n=0..30); %t A322294 s[n_] := s[n] = If[n < 4, {1, 1, 2*t, 4*t + 2*t^2}[[n + 1]], Expand[(n + 1 - t)*s[n - 1] - (1 - t)*(n - 2 + 3*t)*s[n - 2] - (1 - t)^2*(n - 5 + t)*s[n - 3] + (1 - t)^3*(n - 3)*s[n - 4]]]; %t A322294 t[n_, k_] := Ceiling[Coefficient[s[n], t, k]]; %t A322294 a[n_] := t[n, Floor[n/2]]; %t A322294 a /@ Range[0, 30] (* _Jean-François Alcover_, Sep 25 2019, after _Alois P. Heinz_ *) %Y A322294 Bisections give A322295 (even part), A322295 (odd part). %Y A322294 Cf. A001100. %K A322294 nonn %O A322294 0,3 %A A322294 _Alois P. Heinz_, Dec 02 2018