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 A269042 #18 Apr 01 2017 19:13:26 %S A269042 0,0,1,132,15767,2190688,370531683,77182248916,19835792076675, %T A269042 6266271456118776,2413632612087046844,1120958514818713738544, %U A269042 619918692943471064695593,403190647991638511052901232,304867528413299672718870216538,265248225675908889875489731636920 %N A269042 Number of permutations of [2n] avoiding the pattern 12...n. %H A269042 Alois P. Heinz, <a href="/A269042/b269042.txt">Table of n, a(n) for n = 0..30</a> %F A269042 a(n) = (2n)! - A269021(n). %F A269042 a(n) = A214015(2n,n-1) for n>0. %F A269042 a(n) ~ (2*n)!. - _Vaclav Kotesovec_, Mar 26 2016 %e A269042 a(2) = 1: 4321. %e A269042 a(3) = 132: 165432, 216543, 261543, 265143, 265413, 265431, 316542, ..., 653412, 653421, 654132, 654213, 654231, 654312, 654321. %p A269042 h:= proc(l) (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`( %p A269042 l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n))(nops(l)) %p A269042 end: %p A269042 g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n])^2, `if`(i<1, 0, %p A269042 add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))): %p A269042 a:= n-> `if`(n=0, 0, g(2*n, n-1, [])): %p A269042 seq(a(n), n=0..15); %t A269042 h[l_] := Function[n, 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}]][Length[l]]; %t A269042 g[n_, i_, l_] := If[n == 0 || i == 1, h[Join[l, Table[1, {n}]]]^2, If[i < 1, 0, Sum[g[n - i*j, i-1, Join[l, Table[i, {j}]]], {j, 0, n/i}]]]; %t A269042 a[n_] := If[n == 0, 0, g[2n, n-1, {}]]; %t A269042 Table[a[n], {n, 0, 15}] (* _Jean-François Alcover_, Apr 01 2017, translated from Maple *) %Y A269042 Cf. A010050, A214015, A267532, A269021. %K A269042 nonn %O A269042 0,4 %A A269042 _Alois P. Heinz_, Feb 18 2016