0

I can not figure out this logic problem! I can figure out how to solve this if it where in coding, but I can not seem to figure this out with just plain math! The thing to solve is this:

Find the number of black triangles for 100 rows. The first row starts off with 1 triangle, and increases by 1 every time.

Now in python for example you could solve this by doing:

currentnum = 100
total = 0
while currentnum != 0:
  currentnum = 100-1
  total = currentnum+total

Please Excuse the Errors in the code :( It has been a while

Now I can not seem to figure out how to make a math equation of this same thing. What equation could I write for this? I can not seem to figure it out, I have been trying a lot of stuff with the Distributive Property. Any help? Thank you

2 Answers2

1

If I understand your problem statement correctly, in the first row there is $1$ triangle, in the second there are $2$ triangles, in the third there are $3$ triangles, all the way up to the hundredth which has $100$ triangles.

So all we have to do is compute the sum

$$1+2+3+\dots+100=\frac{100\times101}{2}=5050$$

Here is a link to another Math.SE post which explains why the sum of the first $n$ natural numbers is $\frac{n(n+1)}{2}$.

1

The formula for triangular numbers is:

$$1+2+3+\cdots+n = \frac{(n+1)n}2 $$

So, for example the sum of the natural numbers up to 100 is $\frac{101\times 100}2 = 5050$ -- as famously (though possibly apocryphically) computed by Gauss.