Weird math problem

Kyle piles 150 toothpick in layers so that each layer has one less toothpick than the layer below. If the top layer has 3 toothpicks, how many layers are there?

Please explain thx.

There may be a more sophisticated way to solve this, but can’t you just add layers?

3+4+5+6+7+…until your sum is 150
Then count how many layers that is

15 layers. A non-guess-and-check way:

Let n be the number of toothpicks in the bottom row:
3+4+5+…+n = 150

Add 3 to both sides to obtain the “Gauss sum” 1+2+3+…+n = 153. Using 1+2+3+…+n = n(n+1)/2, we have n(n+1)/2 = 153 or n(n+1) = 306. sqrt(306) is about 18; we see that n=17 is the solution. The number of layers is the number of numbers in {3,4,5,…,17}, which is 15 (not 14).