Find the number of all ordered triplets $(A,B,C)$ of subsets of $X$ such that $A$ is a subset of $B$ and $B$ is a proper subset of $C.$ Let $X$ be as set containing $n$ elements.Find the number of all ordered triplets $(A,B,C)$ of subsets of $X$ such that $A$ is a subset of $B$ and $B$ is a proper subset of $C.$

I have no idea how to solve this problem.Please help me.Thanks.
 A: Let us forget temporarily about the "proper" subset restriction on $B$. So we want to divide  $X$ into $4$ pairwise disjoint parts, $A_1,A_2,A_3,A_4$, and then let $A=A_1$, $B=A_1\cup A_2$, and $C=A_1\cup A_2\cup A_3$. 
Given such a partition of $X$, there is an associated function $f:X\to\{1,2,3,4\}$ given by $f(x)=i$ if and only if $x\in A_1$. And given any function $f:X\to \{1,2,3,4\}$, we can use $f$ to produce a partition of $X$ into sets $A_1,A_2, A_3,A_4$, and then produce uniquely determined sets $A\subseteq B\subseteq C\subseteq X$. 
There are $4^n$ functions from $X$ to $\{1,2,3,4\}$. So without the proper subset restriction, there are $4^n$ ways to do the job. We leave dealing with the restriction to you. From $4^n$ we must subtract the number of ways to choose $A,B,C$ such that $A\subseteq B=C\subseteq X$. 
A: First let's solve this simplier problem : What's the number $\mathcal{N}$ of sets of $X$ such that $|A| = a$, $|B| = b$ and $|C| = c$ with $n \geq a>b>c >0$?
There is $n\choose a$ way to choose $A$, then $a\choose b$ ways to choose $B$ inside $A$, then $b\choose c$ way to choose $C$ inside $B$. This way, we have all the possible set without double. 
$$\mathcal{N}(a,b,c) = {n\choose a}{a \choose b}{b\choose c}$$
So now we can answer the original question (with $n \geq 3$):
$$\mathcal{N} = \sum_{a=3}^n \sum_{b=2}^a \sum_{c=1}^b {n\choose a}{a \choose b}{b\choose c}$$
$$=\sum_{a=3}^n \left( {n\choose a} \sum_{b=2}^a \left( {a \choose b} \sum_{c=1}^b {b\choose c} \right) \right)$$
But with classical binomial formula, this is also equal to 
$$=\sum_{a=3}^n \left( {n\choose a} \sum_{b=2}^a \left( {a \choose b} \left( \sum_{c=0}^b {b\choose c} - 1 \right)\right) \right)$$
$$=\sum_{a=3}^n \left( {n\choose a} \sum_{b=2}^a \left( {a \choose b} ( 2^b -1 ) \right) \right)$$
$$=\sum_{a=3}^n \left( {n\choose a} \left( \sum_{b=2}^a  {a \choose b} 2^b - \sum_{b=2}^a  {a \choose b}  \right) \right)$$
$$=\sum_{a=3}^n \left( {n\choose a} \left( \sum_{b=0}^a  {a \choose b} 2^b -( 1 + 2a ) - \sum_{b=0}^a  {a \choose b} + (1+a) \right) \right)$$
$$=\sum_{a=3}^n \left( {n\choose a} \left( 3^a-2^a-a \right) \right)$$
$$=\sum_{a=0}^n {n\choose a} 3^a - (1+3n+9\frac{n(n-1)}{2}) -\sum_{a=0}^n {n\choose a} 2^a + (1+2n+4\frac{n(n-1)}{2}) - \sum_{a=0}^n {n\choose a} a + (1+2n) $$
Finally we get
$$= 4^n -3^n - 2^{n-1}n -5\frac{n(n-1)}{2} +n+1$$
