Deranged Twins: Number of ways to derange n+2 objects where 2 objects are indistinguishable. This is exercise 12, page 163, Harris, Hirst and Mossinghoff, "Combinatorics and Graph Theory".
Suppose n+2 people are seated behind a long table facing an audience to staff a panel discussion.  Two of the people are identical twins wearing identical clothing.  At intermission the panelists decide to rearrange themselves so that it will be apparent to the audience that everyone has moved to a different seat when the panel reconvenes.  Each twin therefore can take neither her own former place nor her twin's.  Let T(n) denote the number of different ways to derange the panel in this way.
Determine a formula for T(n). 
I think I have the first few terms with this brute force Mathematica code (with Combinatorica):
Table[Length[
  Select[Derangements[n + 2], #[[1]] != 2 && #[[2]] != 1 &]], {n, 0, 
  7}]
0, 0, 4, 24, 168, 1280, 10860, 101976
I am assuming it makes no difference where the twins are seated before intermission so if we let 1 and 2 represent the twins then T(2) = 4 because we have:
{3, 4, 1, 2}, {3, 4, 2, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}.
The exercise also gives the value of T(10) as 72755370.
 A: Let $!(n)$ be the subfactorial-derrangement function. There are $!(n+2)$ ways to derrange the $n+2$ persons, however some of these derrangements send one of the twins to another of the twins position. We shall classify into three different cases qe need to substract
If twin 1 gets sent to twin 2's position but twin 2 does not get sent back to twin 1's position then for each of the remaining persons there will be exactly 1 forbidden choice of seat, so there are $!(n+1)$ of these choices.
If twin 2 gets sent to twin 1's position but twin 1 does not get sent back to twin 2's position then for each of the remaining persons there will be exactly 1 forbidden choice of seat, so there are $!(n+1)$ of these choices,
if twin 1 gets sent to twin 2 and twin 2 gets sent to twin 1 then there are $!n$ of these cases.
Therefore $t(n)=!(n+2)-2(!(n+1))-!n$. However the two twins are identical so we need to divide by $2$ and we get $$t(n)=\dfrac{!(n+2)-2(!(n+1))-!n}{2}$$
Checking for $t(10)$ we get $72755370$ as desired.
