Problem 2. Determine for which values of $n$ there exists a convex polygon with $n$ sides whose interior angles, expressed in degrees, are all integers, are in arithmetic progression, and are not all equal.
Solution. Let $x$ be the measure of the largest angle and $d$ the difference of the arithmetic progression. In this way,

$$
n x-\frac{d n(n-1)}{2}=180(n-2)
$$

or alternatively

$$
720=n(360-2 x+d(n-1))
$$

Since $360-2 x>0$ due to the polygon being convex, it necessarily follows that

$$
n(n-1)<d n(n-1)<720
$$

In particular, solving the quadratic equation, we have that $n \leq 27$. Now, if we analyze equation (1), it turns out that $n$ divides 720, so it suffices to focus on the divisors of 720 that are between 3 and 27, that is: $\{3,4,5,6,8,9,10,12,15,16,18,20,24\}$. We will analyze when there is a solution for $d=1$. In that case, it must be

$$
x=\frac{n-1+360+720 / n}{2} .
$$

If $n$ is odd, $n-1$ will be even and to have an integer we must impose that $720 / n$ be even, which is clear if $n$ is odd. This gives solutions for $\{3,5,9,15\}$. If $n$ is even, $720 / n$ must be odd, so $n$ must be a multiple of 16 and only provides a solution for $n=16$.

For the rest of the cases, we can now assume that $d \geq 2$, and returning to (2) we have that $n \leq 18$, which rules out $n=20$ and $n=24$ and leaves 6 cases to analyze with $d=2$, where

$$
x=\frac{2(n-1)+360+720 / n}{2}
$$

This means we only need to impose that $720 / n$ be even, which is achieved whenever $n$ is not a multiple of 16 and works, therefore, for $n \in\{4,6,8,10,12,18\}$. We conclude then that what is asked in the statement is possible for

$$
n \in\{3,4,5,6,8,9,10,12,15,16,18\}
$$