You have n pairs of socks, ie 2n socks, with shades of gray numbered from 1-white to n-black. You blindly remove the socks from the drawer and pair them at random. What the probability such that every paired different at most at one color?
Note: The colors between 1 and n, so the pair (1,2) is legal and the pair (1,3) isn't legal because the difference in the colors is 2 and not 1 or 0.
The answer: $\frac{(2^{n+1}+(-1)^n)2^nn!}{3(2n)!}$
I could not figure out how to solve the question and get to the closed expression in the answers. I would be happy if you keep the answer simple as much as possible. Thanks.