Qm

How many triangles in a triangle of side four?

An equilateral triangle of side 4 is divided by lines parallel to its sides into 16 small equilateral triangles of side 1 (rows of 1, 3, 5 and 7 small triangles).

How many triangles of all sizes can be found in the figure? Count the upward-pointing and downward-pointing triangles separately, and give the totals for a triangle of side 3 as a check.

Show a hint

Upward triangles of side k have their top corner at any of the grid points in the top n minus k + 1 rows. Downward triangles of side k need room below them, so they fit only in the lower rows and only up to side n/2.

Your answer

Solving needs a free account

Answers, streaks and solutions unlock when you are signed in. Reading the question and the hint stays free.

Discussion

Sign in to join the discussion · reading is open to everyone

💡 Discussion rules

  1. No full solutions here. Hints and approaches only.
  2. Complexity, edge cases and intuition are the point.
  3. Interview experiences are welcome. Respect your NDAs.

Loading discussion…

Learn the concepts

The theory behind this question.

Related questions

1, 2, 4, 8, 16, ... and the pattern that breaksHow many diagonals does a cube have?How many diagonals does a twenty-sided polygon have?Fifty-one ants and a small square cardHow many squares are on a chessboard?
All questions →