A horizontal line passing through point A is L1. A horizontal line passing through point B & C is L2. Given Triangle is Inverted : __B__________C___ L2 \________/ \______/ Fig: An Outline Of inverted Triangle \____/ \__/ ______\/_______L1 A Look for triangles with base parallel to L1(White Colored).You will find: First level with height 1 Unit: 0 Second Level with height 1 units: 1 In general for nth level with height 1 unit: n-1 So total number of triangles with height of 1 unit are: 0+1+2+3..................n-1 = n(n-1)/2 First level with height 2 unit: 0 Second level with height 2 unit: 0 Third level with height 2 unit: 0 Fourth level with height 2 unit: 1 Fifth level with height 2 unit : 2 In general nth level with height 2 units is: n-3 So number of triangles with height 2 units are: 1+2+3+.............n-3= (n-3)(n-2)/2 In general Total number of triangles with the given triangle inverted & with base parallel to L1 are: 1/2*{ n(n-1)+(n-2)(n-3)+(n-4)(n-5)+.............................0} -------Equation1 Original Triangle: Look for triangles with base parallel to L2 from top: Number of triangles with height 1(filled with white color) at first to nth level: 1+2+3+----------------+n= n(n+1)/2 Number of triangles with height 2 from first to nth level: 0+1+2+3+----------------+(n-1)=(n-1)(n)/2 Number of triangles with height 3 from first to nth level: 0+0+1+2+3+--------------+(n-2)=(n-2)(n-1)/2 In general total number of triangles with base parallel to L2 are: 1/2*{ n(n+1)+(n-2)(n-3)+(n-4)(n-5)+...........................0}------------Equation2 So total number of triangles in given triangle seen from every angle are(Equation1 + Equation2: 1/2*[{n(n-1)+(n-2)(n-3)+(n-4)(n-5)+............0}+{ n(n+1)+(n)(n-1)+(n-2)(n-1)+............0}] Now the task is to simply the above equation =1/2* {n(n+1)+(n-2)(n-1)+..................}+{(n)(n-1)+(n-2)(n-3)+.................. =1/2*{(n)(3n-1)+(n-2)(3n-7)+(n-4)(3n-13)+...........} =1/2*S(3n^2-12nr-n+12r^2+2r) where r =0 to X & X=int(n+1)/2 =1/2{3*n^2*X - 12n.X(X+1)/2-nX+12* X(X+1)(2X+1)/2+2*X(X+1)/2} On simplification, Total Number of Triangles : X/2*{(4X^2-5X+1)+n(3n+5-6X)} where n= Number of levels X=integer value of (n+1)/2 Example: Lets take n=7 then X=(7+1)/2=4 Total Number of triangles: 4/2*{(4*4^2-4*5+1)+7(3*7+5-6*4)} =2*{45+14} =118 For n=1 N= 1 n=2 N= 5 n=3 N= 13 n=4 N= 27 n=5 N= 48 n=6 N= 78