Triangles in Triangle
If I understand you correctly:
or r
How many triangles of all sizes can be found in a triangle 'n' rows high ?
Or
A single equilateral triangle contains one triangle, n = 1.
One triangle sitting atop three others, n = 2 rows high, contains 5 triangles all together, 4 small ones and 1 large one.
......../_\
....../_\/_\
These 5 small triangles sitting atop 5 additional triangles, n = 3, contains 13 triangles all together, 9 small ones, 3 medium ones, 2 triangles high, and 1 large one, 3 triangles high.
......../_\
....../_\/_\
..../_\/_\/_\
Find the number of distinct triangles in the nth triangle "n" triangles high.
/_\......../_\................/_\................../_\
.........../_\/_\............/_\/_\............../_\/_\
............................./_\/_\/_\........../_\/_\/_\
................................................./_\/_\/_\/_\
If you draw any more, you will soon see the emerging pattern.
1.....5.....13.....26.....45.....71.....105.....148.....201.....265.....etc.
Following the totals of the first few will enable you to project the total in the 100th if you wish.
What do we now have?
Base size or height-n..................1.....2.....3.....4.....5.....6......7......8......9......10.....etc.
Triangles....................................1.....5....13...26...45...71...105..148..201...265....etc.
1st difference - d1.........................4....8....13....19...26....34...43....53.....64.........etc.
2nd difference - d2..........................4.....5.....6.....7......8......9....10....11.....12.....etc.
3rd difference – d3......................…...1.....1.....1......1......1.....1......1......1.......1......1
With the 3rd differences being constant at 1 we have a finite difference sequence with the nth term being of the form
T = an^3 + bn^2 + cn + d.
Using the data:
a + b + c + d = 1
8a + 4b + 2c + d = 5
27a + 9b + 3c + d = 13
64a + 16b + 4c + d = 26.
Solving, a = 1/6, b = 1, c = - 1/6 and d = 1.
Therefore, the general expression for the nth term is T = (n^3 + 6b^2 - n)/6.
With n = 4, we get T = (4^3 + 6(4^2) - 6 + 6)/6 = 26.
With n = 5, we get T = (5^3 + 6(5^2) - 5 + 6)/6 = 45.
With n = 6, you should get (I’ll let you calculate this.).
<----------------------------------------------------------------->