i want a formula for counting triangles in a big triangle
for example:
level 1=1
level 2=5
level 3=13 and son on>>>
plz help me
Or go here:
1,4,10,20 - OEIS Search Results
Please check this
When $\displaystyle n $ is odd , the formula is
$\displaystyle \binom{n+2}{3} + \frac{(n-1)(n+1)(2n+3)}{24} $
When $\displaystyle n $ is even , it is
$\displaystyle \binom{n+2}{3} + \frac{n(n+2)(2n-1)}{24} $
Or generally the number of triangles we can count is $\displaystyle \binom{n+2}{3} + \frac{ n(n-1)(2n+5) + 6\lfloor{ \frac{n}{2} \rfloor} }{24} $
Or $\displaystyle \frac{ n(n+2)(2n+1) + 2\lfloor{ \frac{n}{2} \rfloor} - n }{8} $