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 A329550 #16 Apr 21 2022 05:24:55 %S A329550 0,0,0,2,16,108,864,7200,69120,705600,8064000,97977600,1306368000, %T A329550 18441561600,281652940800,4533271142400,78111748915200, %U A329550 1412288317440000,27115935694848000,544201764986880000,11524272670310400000,254238259854458880000,5887622859787468800000 %N A329550 Total number of consecutive triples of the form (odd, even, odd) or (even, odd, even) in all permutations of [n]. %C A329550 All terms are even. %H A329550 Alois P. Heinz, <a href="/A329550/b329550.txt">Table of n, a(n) for n = 0..449</a> %F A329550 a(n) = Sum_{k>=1} k * A152877(n,k). %F A329550 a(n) ~ n! * n / 4. - _Vaclav Kotesovec_, Nov 19 2019 %e A329550 a(3) = 2: 123, 321. %p A329550 a:= proc(n) option remember; `if`(n<5, [0$3, 2, 16][n+1], %p A329550 (n-2)*(2*(n-4)*a(n-1)+(n-3)^2*n*a(n-2))/(n-3)/(n-4)) %p A329550 end: %p A329550 seq(a(n), n=0..30); %t A329550 a[n_] := a[n] = If[n < 5, {0, 0, 0, 2, 16}[[n+1]], %t A329550 (n-2)*(2*(n-4)*a[n-1] + (n-3)^2*n*a[n-2])/(n-3)/(n-4)]; %t A329550 Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Apr 21 2022, after _Alois P. Heinz_ *) %Y A329550 Cf. A152877. %K A329550 nonn %O A329550 0,4 %A A329550 _Alois P. Heinz_, Nov 16 2019