22. Find the number of triangles whose sides are formed by the sides and the diagonals of a regular heptagon (7-sided polygon). (Note: The vertices of triangles need not be the vertices of the heptagon.)
22. Answer: 287.
A triangle can be formed using $3,4,5$ or 6 vertices.

So the total number is
$$
\binom{7}{6}+5 \times\binom{ 7}{5}+2 \times 2 \times\binom{ 7}{4}+\binom{7}{3}=287
$$