Construct a deterministic finite automation The question asks to:


  construct a DFA which accepts exactly $\frac{n(n-1)(n-2)}{6} + \frac{n(n-1)}{2}+1$ many members of $\{0, 1\}^n$ for every n.


I have no idea where to start to constructing the DFA, could you give some directions?
By the way, how many states should this DFA have?
Hint: Here is a regular language which "accepts" exactly $n$ members of $\{0,1\}^n$ for every $n$: $0^* 1 0^*$. For example, for $n=4$ we have the strings $0001,0010,0100,1000$. The minimal DFA for this language contains three states.