Spheres are stacked as shown in the figure below. The numbers of spheres on each level that form a square make up a sequence. The sequence is described so that for , (there is one sphere at the top), for , the number of spheres below the upper sphere in the second row (there are four spheres there).
Write down the formula used to calculate the number of spheres in the nth row (looking from top to bottom). How many of all the balls are in the pile in the figure?