Suppose we have $n$ different symbols: $a_1,a_2,\dots,a_n$. How many words of length $2n$ consisting of two $a_i$'s for $i=1,2,\dots,n$ such that no two consecutive digits are the same.
(a) What is the number of words of length $2n$ consisting of two $a_i$'s for $i=1,2,\dots,n$?
(b) What is the number of words of length $2n$ consisting of two consecutive $a_1$'s, two consecutive $a_2$'s, two consecutive $a_3$'s and two $a_i$'s for $i=4,5,\dots,n$?
(c) For $j=1,2,\dots,n$, let $A_j$ be the set of words of length $2n$ consisting of two $a_i$'s for $i=1,2,\dots,n$ such that the two $a_j$'s are consecutive.
(d) Use PIE to find $|A_1\cup\cdots\cup A_n|$.
(e) What is the number of words of length $2n$ consisting of two $a_i$'s for $i=1,2,\dots,n$ such that no two consecutive digits are the same? Evaluate this for $n=1,2,3$.
a) You have $(2n)!$ possible arrangement of all the numbers, then you need to remove all arangement of the two $a_i$ for all $i$, so your answer is $\frac{(2n)!}{2!2!\dots 2!} = (2n)! 2^{-n}$.
b) Since it is a and, you can always consider the two $a_i$ as one item, so you need to arrange $n$ items which is doable in $n!$ ways.
c) I imagine you want the size of $A_j$, in this case you have $2n-1$ items, that is the two $a_j$ in one pair and all the two $a_i$ separated for $i\neq j$. Again we need to remove the permutation of the two $a_i$ for $i\neq j$. We obtain $(2n-1)! 2^{1-n}$.
d) We need to find $\lvert A_1 \cap \dots \cap A_k \rvert$ for some $k$. Using the same reasoning as before we arrange $2n-k$ items and remove the arangement of $n-k$ of the free pairs, that is $(2n-k)! 2^{k-n}$. A good sanity check so far is to see that this match with point a) and b). Now we use the inclusion exclusion principle but the good thing is that by symmetry we only care about the number of different set that are intersected, so \begin{align*} |A_1\cup \dots \cup A_n|&=\sum_{k=1}^{n}(-1)^{k-1}{n\choose k}|A_1\cap \dots \cap A_{k}|\\ &=\sum_{k=1}^{n}(-1)^{k-1}{n\choose k} (2n-k)! 2^{k-n} \end{align*}
e) using a) and d) we get $(2n)! 2^{-n} - \sum_{k=1}^{n}(-1)^{k-1}{n\choose k} (2n-k)! 2^{k-n}=\sum_{k=0}^{n}(-1)^{k}{n\choose k} (2n-k)! 2^{k-n}$, it gives the following values, for $n=1$, we get $0$, for $n=2$ we get $2$ and for $n=3$ we get $30$.
I do not know a closed expression for the sum.