Note: This was done empirically, which means I have no solid proof for this shortcut. I am too lazy to figure out one but I'll leave it here for the sake of my hate for counting triangles. If anyone has a way to prove [or disprove] this, leave it on the comments.
Day: 10 Jan 2020, 23:55 (+01:00)
You are given to count the no. of triangles in an equaled cut triangle [you have to count more than just separated triangles]:
This one has four sides. But I am too lazy to count. I figured a pattern that I wrote on this paper (someone LaTeX this):
Take a triangle made up of n sides, where 'n' is a Natural number. We are going to find the no. of spotted triangles where we do not need to count them. Take this list:
As you can see the pattern we use, this list in relation to number n, we need to take the first n digits of the list. If n = 7 ,we get: [1,3,4,6,7,9,10]
To find the number of triangles made up of n sides, we multiply each digits with ascending order by adding 1, starting with no. '1' starting to the left side of the list. So this would be (again, for n = 7 [it does not matter what 'n' is if it is a Natural no.]) :
(1 x 7) + (3 x 6) + (4 x 5) + (6 x 4) + (7 x 3) + (9 x 2) + (10 x 1)
where this equals 118.
A triangle with 7 sides has triangles in total. You can check that on Google if it is correct (or count).
I am sorry guys for the bad formatting and being so lazy to decorate it (and explaining why does this algorithm work so). I had a very bad day today and I do not feel like doing much. So yeah, "The proof is left as an exercise to the reader".