TITLE: Graphs with prescribed numbers of k-cliques
QUESTION [8 upvotes]: Let $(a_1,a_2,\dots, a_n)$ be a sequence of non-negative integers. 
Q. When does there exists a simple graph $G$ such that its number of $k$-cliques is $a_k$ (that is $G$ has $a_1$ vertices, $a_2$ edges, $a_3$ trinagles, etc)? 
Probably, it is hopeless to get a complete description of such sequences, so I am interested in any necessary or sufficient conditions on $\{a_i\}$.
Upd. As Steve Huntsman mentions in the comments there are trivial necessary conditions: $a_k\le \binom{a_0}{k}$. There are also more complicated inequalities like 
$$
\binom{a_1}{3}-a_3\le \bigl(\binom{a_1}{2}-a_2\bigr)(a_1-2).
$$

REPLY [2 votes]: The case $n=3$ was addressed in Razborov's On the Minimal Density of Triangles in Graphs, where he used his Flag Algebra technique to provide an asymptotically tight lower bound on the number of triangles contained in a graph with a given number of vertices and edges.   
Let $\rho=\frac{a_2}{\binom{a_1}{2}}$ be the density of edges in the graph. If $\rho=1-\frac{1}{t}$ for some integer $t$, then the minimum number of triangles comes from a balanced, complete $t$-partite graph.  If $\rho \in (1-\frac{1}{t}, 1-\frac{1}{t+1})$, then the optimal graph ends up being a complete $(t+1)$-partite graph, with $t$ equal sized parts, and one part smaller than the rest.  Optimizing over the size of the parts gives the (complicated) bound in Razborov's paper.