%I #9 Nov 03 2018 17:31:42
%S 1,3,20,174,1915,25861,407691,7330188,148016449,3312032213,
%T 81207824255,2162810487154,62125097028962,1913156511113517,
%U 62839800627095263,2191735865280260976,80859575674731497805,3144804693463679033629,128550453029684197431607
%N Sum over all permutations of [n] of the length of the longest increasing subsequence raised to the power of the length of the longest decreasing subsequence.
%H Alois P. Heinz, <a href="/A321276/b321276.txt">Table of n, a(n) for n = 1..70</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Longest_increasing_subsequence">Longest increasing subsequence</a>
%p h:= l-> (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`(j>
%p l[k], 0, 1), k=i+1..n), j=1..l[i]), i=1..n))(nops(l)):
%p f:= l-> h(l)^2*l[1]^nops(l):
%p g:= (n, i, l)-> `if`(n=0 or i=1, f([l[], 1$n]),
%p g(n, i-1, l) +g(n-i, min(i, n-i), [l[], i])):
%p a:= n-> g(n$2, []):
%p seq(a(n), n=1..23);
%Y Cf. A003316, A321273, A321274, A321275, A321277, A321278.
%K nonn
%O 1,2
%A _Alois P. Heinz_, Nov 01 2018