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.

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

This page as a plain text file.
%I A193639 #31 Feb 15 2025 20:23:08
%S A193639 1,0,2,8,8,8,240,288,144,48,13824,15744,8064,2304,384,1263360,1401600,
%T A193639 710400,211200,38400,3840,168422400,183582720,92620800,28108800,
%U A193639 5529600,691200,46080,30865121280,33223034880,16717639680,5148057600,1061222400,149022720,13547520,645120
%N A193639 Triangle T(n,k) of ways n couples can sit in a row with exactly k of them together.
%C A193639 Row n sums to (2*n)!.
%C A193639 Dot product of row n and (0,1,2,3,...n) is equal to (2*n)!, for n > 0.
%C A193639 Dot product of row n and (0,0,1,2,...n-1) is equal to T(n,0), for n > 0.
%H A193639 Andrew Woods, <a href="/A193639/b193639.txt">Rows n = 0..50 of triangle, flattened</a>
%F A193639 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 A193639 T(n, n) = 2^n * n! = (2*n)!!.
%F A193639 T(n, k) = Sum_{i=k..n} (-1)^(i-k) * 2^i * (2*n-i)! * binomial(n, i) * binomial(i, k).
%F A193639 T(n, 0) = A007060(n).
%F A193639 T(n, n) = A000165(n).
%e A193639 Triangle begins:
%e A193639   1
%e A193639   0 2
%e A193639   8 8 8
%e A193639   240 288 144 48
%e A193639   13824 15744 8064 2304 384
%e A193639 There are T(3, 2) = 144 ways to arrange three couples in a row so that exactly two of them are together.
%t A193639 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 A193639 nonn,tabl
%O A193639 0,3
%A A193639 _Andrew Woods_, Aug 01 2011