The total number of triangle (including inverted ones) in the above figures is given by
References
Conway, J. H. and Guy, R. K. ``How Many Triangles.'' In The Book of Numbers. New York:
Springer-Verlag, pp. 83-84, 1996.
Sloane, N. J. A. Sequence
A002717/M3827
in ``An On-Line Version of the Encyclopedia of Integer Sequences.''
http://www.research.att.com/~njas/sequences/eisonline.html and Sloane, N. J. A. and Plouffe, S.
The Encyclopedia of Integer Sequences. San Diego: Academic Press, 1995.