login
Triangle T(n,k) of ways n couples can sit in a row with exactly k of them together
2

%I #27 Apr 22 2014 03:01:21

%S 1,0,2,8,8,8,240,288,144,48,13824,15744,8064,2304,384,1263360,1401600,

%T 710400,211200,38400,3840,168422400,183582720,92620800,28108800,

%U 5529600,691200,46080,30865121280,33223034880,16717639680,5148057600,1061222400,149022720,13547520,645120

%N Triangle T(n,k) of ways n couples can sit in a row with exactly k of them together

%C Row n sums to (2n)!

%C Dot product of row n and (0,1,2,3,...n) is equal to (2n)!

%C Dot product of row n and (0,0,1,2,...n-1) is equal to T(n,0)

%H Andrew Woods, <a href="/A193639/b193639.txt">Rows n = 0..50 of triangle, flattened</a>

%F T(n, k) = 2*(2*n-k)*T(n-1, k-1) + ((2*n-1-k)*(2*n-2-k)+2*k)*(T(n-1, k) + 2*(k+1)*(2*n-2-k)*T(n-1, k+1) + (k+2)*(k+1)*T(n-1, k+2)

%F T(n, n) = 2^n * n! = (2n)!!

%F T(n, k) = sum(i=k..n, (-1)^(i-k) * 2^i * (2n-i)! * binomial(n, i) * binomial(i, k))

%F T(n, 0) = A007060(n).

%F T(n, n) = A000165(n).

%e Triangle begins:

%e 1

%e 0 2

%e 8 8 8

%e 240 288 144 48

%e 13824 15744 8064 2304 384

%e There are T(3, 2) = 144 ways to arrange three couples in a row so that exactly two of them are together.

%t Table[Table[Sum[(-1)^k Binomial[n-i,k](2n-i-k)! 2^(k+i),{k,0,n-i}]*Binomial[n,i],{i,0,n}],{n,0,10}]//Grid (* _Geoffrey Critzer_, Apr 21 2014 *)

%K nonn,tabl

%O 0,3

%A _Andrew Woods_, Aug 01 2011