%I #24 Sep 08 2022 08:44:59
%S 0,0,4,24,144,960,7200,60480,564480,5806080,65318400,798336000,
%T 10538035200,149448499200,2266635571200,36614882304000,
%U 627683696640000,11381997699072000,217680705994752000
%N a(n) = (2*n - 2)*n!.
%C Number of permutations of {1,2,...,n+2} such that there are exactly two entries between the entries 1 and 2. Example: a(2)=4 because we have 1342, 1432, 2341 and 2431. - _Emeric Deutsch_, Apr 06 2008
%C a(n) = A138770(n+2). - _Emeric Deutsch_, Apr 06 2008
%H Vincenzo Librandi, <a href="/A052609/b052609.txt">Table of n, a(n) for n = 0..300</a>
%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=554">Encyclopedia of Combinatorial Structures 554</a>
%F E.g.f.: 2*x^2/(-1+x)^2.
%F Recurrence: {a(1)=0, a(0)=0, a(2)=4, (-n^2-n)*a(n)+(n-1)*a(n+1)}.
%p spec := [S,{S=Prod(Z,Sequence(Z),Sequence(Z),Union(Z,Z))},labeled]: seq(combstruct[count](spec,size=n), n=0..20);
%o (Magma) [0],[(2*n-2)*Factorial(n): n in [1..25]]; // _Vincenzo Librandi_, Oct 11 2011
%o (PARI) a(n)=(2*n-2)*n! \\ _Charles R Greathouse IV_, Nov 20 2011
%Y Cf. A138770.
%K easy,nonn
%O 0,3
%A encyclopedia(AT)pommard.inria.fr, Jan 25 2000