<s>[INST] Convex Quadrilaterals Let $n>4$.
In how many ways can we choose $4$ vertices of a convex $n$-gon so as to form a convex quadrilateral, such that at least $2$ sides of the quadrilateral are sides of the $n$-gon?
Explain your answer, which should be expressed in terms of $n$.
 [/INST] We need to count the number of ways to choose 4 vertices so that at least two pairs of vertices are adjacent.
There are  $\dbinom{n-3}{4}-\dbinom{n-5}{2}$ ways to choose them so that none are adjacent,
and there are $n\dbinom{n-5}{2}$ ways to choose them so that exactly two are adjacent;
so this gives a total of $\displaystyle\binom{n}{4}-\binom{n-3}{4}-(n-1)\binom{n-5}{2}=\frac{n(3n-13)}{2}$ ways to choose the vertices.

Alternate solution:
1) There are $n$ ways to choose all 4 vertices adjacent
2) There are $n(n-5)$ ways to choose the vertices so that exactly 3 are
    adjacent.
3) There are $\displaystyle\frac{n(n-5)}{2}$ ways to choose the vertices so that there are 2 separate pairs which are adjacent.
This gives a total of $\displaystyle n+n(n-5)+\frac{n(n-5)}{2}=\frac{n(3n-13)}{2}$ possibilities.
</s>