Number of partitions for given list into three ways
Solution 1:
You are looking at $3!\cdot {n\brace 3}$ where ${n \brace k}$ is the Stirling number of the second kind. You can write this as $$3^{n}-3\cdot 2^{n}+3.$$
You are looking at $3!\cdot {n\brace 3}$ where ${n \brace k}$ is the Stirling number of the second kind. You can write this as $$3^{n}-3\cdot 2^{n}+3.$$