2. The bases of the prism are two identical convex $n$-gons. The number $v$ of vertices of this body, the number $s$ of its wall diagonals, and the number $t$ of its body diagonals form the first three terms of an arithmetic sequence in a certain order. For which $n$ does this hold?

(Note: By the walls of the prism, we mean the lateral faces as well as the bases. A body diagonal is a segment that connects two vertices of the prism that do not lie in the same face.)
2. Every $n$-sided prism has exactly $n$ vertices in each of its bases, so it holds that $v=2 n$. From each vertex, $n-3$ diagonals lie in the base and two diagonals lie in the side faces, making a total of $n-1$ face diagonals. From $2 n$ vertices, therefore, $2 n(n-1)$ face diagonals emanate, but each of them is counted twice, so $s=n(n-1)$. Similarly, we determine the number $t$ of body diagonals: from each vertex, there are $n-3$ of them (to all vertices of the other base except for those three vertices, with which the given vertex is connected by an edge or a diagonal in the side face), so $t=2 n(n-3): 2=n(n-3)$.

We are looking for all integers $n \geqq 3$, for which the numbers

$$
v=2 n, \quad s=n(n-1) \quad \text { and } \quad t=n(n-3)
$$

form a triplet $x, y, z$ in some order with the property $y-x=z-y$ or $y=\frac{1}{2}(x+z)$. By simple substitution, we find that for $n=3$ it is an unsuitable triplet of numbers $6,6,0$, while for $n=4$ we get the suitable triplet $8,12,4$ (it holds that $8=\frac{1}{2}(4+12)$). For any $n \geqq 5$, we have $n-1>n-3 \geqq 2$, from which, after multiplying by the number $n$, we get $s>t \geqq v$, so the required equality of $s$ as the arithmetic mean must be of the form $t=\frac{1}{2}(v+s)$. After substitution, we get the equation

$$
n(n-3)=\frac{2 n+n(n-1)}{2}
$$

with the only admissible root $n=7$ (the root $n=0$ has no real meaning).

Conclusion: Only $n=4$ and $n=7$ satisfy the condition.

For a complete solution, award 6 points, of which 1 point for expressing the number $s$ and 2 points for expressing the number $t$ (in dependence on the variable $n$), further points according to the completeness of the discussion, in what order the numbers $v, s, t$ can form an arithmetic sequence. If the solver omits the solution $n=4$ (e.g., by declaring the inequalities $s>t>v$ as obvious), award no more than 5 points.