74 cans of food are stacked in layers. Apart from the top layer, the number of cans in each of the other layers is 1 fewer than the layer below it. When the bottom layer has the least number of cans of food, how many layers are there?
Let the bottom layer has n cans, and there are r layers, so
n + (n - 1) + . . . + (n - r + 1) = 74
==> (2n - r + 1)*(r/2) = 74
==> (2n - r + 1)*r = 74*2 = 37*4 = 4*37
if r = 2, then 2n - r + 1 = 74, so n = 37.5 (reject, not an integer)
if r = 4, then 2n - r + 1 = 37, so n = 20 (Ok)
if r = 37, then 2n - r + 1 = 4, so n = 20 (reject, as r > n)
Ans : There are 4 layers, and the bottom layer has 20 cans.