%I #25 Dec 15 2021 00:11:09
%S 1,1,1,1,1,0,1,1,0,1,0,1,0,1,1,2,4,6,10,14,20,26,31,36,40,44,44,44,40,
%T 36,31,26,20,14,10,6,4,2,1,1,2,4,6,34,62,116,170,547,924,1624,2324,
%U 5572,8820,14616,20412,40509,60606,95004,129402,224406,319410
%N Irregular triangle read by rows: T(n,k) = number of size k subsets of S_n that remain unchanged by a rotation of 90 degrees.
%C A permutation, p, can be thought of as a set of points (i, p(i)). If you plot all the points and rotate the picture by 90 degrees then you get a permutation back.
%C T(n,k) is the number of size k subsets that remain unchanged by a rotation of 90 degrees.
%F T(n,k) = Sum_( C( R(n) - T(n), i ) * Sum_(C(n! - R(n), j) * C(T(n), k - 4*i - 2*j) for j in [0..floor((k-4*i)/2)] for i in [0..floor(k/4)] ) where R(n) = A037223(n) and T(n) = A037224(n).
%e For n = 4 and k = 2, the subsets unchanged by a 90-degree rotation are {4321,1234}, {4231,1324}, {3412,2143} and {3142,2413}. Hence T(4,2) = 4.
%e Triangle starts:
%e 1, 1;
%e 1, 1;
%e 1, 0, 1;
%e 1, 0, 1, 0, 1, 0, 1;
%Y Row lengths give A038507.
%Y Cf. A037223, A037224.
%K nonn,tabf
%O 0,16
%A _Christian Bean_, Sep 28 2016