cp's OEIS Frontend

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.

A267436 Number of self-inverse permutations of [2n] with longest increasing subsequence of length n.

This page as a plain text file.
%I A267436 #16 Jan 02 2021 10:33:34
%S A267436 1,1,5,31,265,2446,26069,294386,3628517,46938514,645978814,9265791393,
%T A267436 139408562319,2174338555026,35259402634616,590187761512336,
%U A267436 10209739522685893,181678453872654154,3326776921054665350,62485419303819431072,1203772979032614462448
%N A267436 Number of self-inverse permutations of [2n] with longest increasing subsequence of length n.
%C A267436 Also the number of 2n-length words w over n-ary alphabet {a1,a2,...,an} such that for every prefix z of w we have #(z,a1) >= #(z,a2) >= ... >= #(z,an) >= 1, where #(z,x) counts the letters x in word z. The a(2) = 5 words of length 4 over alphabet {a,b} are: aaab, aaba, abaa, aabb, abab.
%H A267436 Vaclav Kotesovec, <a href="/A267436/b267436.txt">Table of n, a(n) for n = 0..70</a> (terms 0..55 from Alois P. Heinz)
%F A267436 a(n) = A047884(2n,n).
%e A267436 a(2) = 5: 1432, 2143, 3214, 3412, 4231.
%p A267436 h:= proc(l) local n; n:= nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
%p A267436     add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n) end:
%p A267436 g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n]), add(
%p A267436                 g(n-i*j, i-1, [l[], i$j]), j=0..n/i)):
%p A267436 a:= n-> g(n$2, [n]):
%p A267436 seq(a(n), n=0..25);
%t A267436 h[l_] := With[{n = Length[l]}, Total[l]!/Product[Product[1 + l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i + 1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
%t A267436 g[n_, i_, l_] := If[n == 0 || i == 1, h[Join[l, Table[1, {n}]]], Sum[g[n - i*j, i - 1, Join[l, Table[i, {j}]]], {j, 0, n/i}]];
%t A267436 a[n_] := g[n, n, {n}];
%t A267436 a /@ Range[0, 25] (* _Jean-François Alcover_, Jan 02 2021, after _Alois P. Heinz_ *)
%Y A267436 Cf. A047884, A267433, A293128.
%K A267436 nonn
%O A267436 0,3
%A A267436 _Alois P. Heinz_, Jan 15 2016