Math Puzzle - Rock Problem A child is arranging rocks in layers. He can arrange the rocks, in such way that, any layer has lesser rocks than its base layer. Given n rocks, In how many ways can the child arrange the rocks?
 A: What you want is the number of partitions of a given number $n$ with distinct parts. see OEIS. 
You can find a lot of information there. You may be interested in restricted partitions.
P.S. The number of partitions of $n$ into distinct parts equals the number of partitions of $n$ into odd parts. see here.
A: Not a close form formula, but I am thinking of solving in this way:
Let $f(n,m)$ be the number of ways $n$ rocks can be arranged (before considering permutations), with the extra constraint that the bottommost layer has $m$ rocks. There is exactly one way to arrange $0$ rocks with $0$ rocks on the bottom, so $f(0,0) = 1$. And there is no way to arrange $0$ rocks with $m>0$ rocks on the bottom, so $f(0,m) = 0$ for $m>0$.
Consider the sum $1+2+3 + \cdots + m = \frac{m(m+1)}2$. $m$ is the minimum number of rocks on the base layer for $\frac{m(m+1)}2$ total number of rocks. So for $n$ total number of rocks, the minimum number of rocks on the base layer is
$$\begin{align*}
\frac{m(m+1)}2 \ge& n\\
m \ge& \left\lceil\frac{\sqrt{8n+1}-1}2\right\rceil
\end{align*}$$
call the minimum number of base rocks for $n$ rocks be $g(n) = \left\lceil\frac{\sqrt{8n+1}-1}2\right\rceil$
From this, a recursion can be formed:
$$f(n,m) = \sum_{i=g(n-m)}^{\max(m-1,n-m)}f(n-m,i)$$
And the required answer for the number of ways to arrange $n$ rocks (without considering permutation) is:
$$f(n) = \sum_{m=g(n)}^{n}f(n,m)$$

For the case of $n=7$, $g(7) = 4$.
$$\begin{align*}
&f(7,4)+f(7,5)+f(7,6)+f(7,7)\\
=&f(3,2)+f(3,3)+f(2,2)+f(1,1)+f(0,0)\\
=&f(1,1)+f(0,0)+f(0,0)+f(0,0)+f(0,0)\\
=& 5
\end{align*}$$
