In this above picture, there are 15 cups, to make a perfect pyramid, you start the bottom row with 5 cups.
What is the formulae to start the bottom row, if I have $n$ cups.
In this above picture, there are 15 cups, to make a perfect pyramid, you start the bottom row with 5 cups.
What is the formulae to start the bottom row, if I have $n$ cups.
Let's start with the other way round. If the base has $k$ cups, the total number of cups $n$ will be given by:
$$n=k+(k-1)+(k-2)+\ldots+1=\frac{k^2+k}{2}$$ Or: $$k^2+k-2n=0$$ Now, just solve the quadratic equation to get: $$k=\frac{-1\pm\sqrt{1+8n}}{2}$$ Only one of these solution will be positive, and of course, only certain $n$ will have integer $k$.