3. A teacher and his students set off by bus to a Republican Mathematics Competition. Out of the 52 seats on the bus, they sat on seats whose numbers are consecutive natural numbers whose sum is 54. How many students did the teacher take with him if only one of the seat numbers on which they sat is a prime number?
Solution. First method. In the bus, there are seats numbered from 1 to 52. Among them, the prime numbers are: $2,3,5,7,11,13,17,19,23,29,31$, $37,41,43$ and 47. From these numbers, we need to find one such that when added to its predecessors and successors, the sum is 54. With the numbers $2,3,5,7,11$, $23,29,31,37,41,43$ and 47, this cannot happen because the sum is either smaller or larger than 54. From the remaining three prime numbers 13, 17, 19, 54 can be obtained in the following two ways: 12+13+14+15 or $17+18+19$ but in the second sum, there are two prime numbers. Therefore, the seats had the numbers $12,13,14$ and 15, which means the teacher was accompanied by three students.

Second method. Let $k+1, k+2, \ldots, n$ be the seat numbers where the teacher and students sat, $k \in \mathbb{N}, n \in \mathbb{N}$ and $n-k>1$. Since the sum of these numbers is 54, we have

$$
\begin{aligned}
& \frac{n(n+1)}{2}-\frac{k(k+1)}{2}=54 \\
& n^{2}+n-k^{2}-k=108 \\
& (n-k)(n+k)+(n-k)=108 \\
& (n-k)(n+k+1)=108
\end{aligned}
$$

The number 108 can be factored as

$$
108=2 \cdot 2 \cdot 3 \cdot 3 \cdot 3, \quad n-k>1, \quad n+k+1>n-k
$$

so we have the following cases:

| first: | $n+k+1=54$, | $n-k=2$ |  |
| :--- | :--- | :--- | :--- |
| second: | $n+k+1=36$, | $n-k=3$ | $n=19, k=16$ |
| third: | $n+k+1=27$, | $n-k=4$ | $n=15, k=11$ |

fourth: $\quad n+k+1=18, \quad n-k=6$

fifth: $\quad n+k+1=12, \quad n-k=9 \quad n=10, k=1$

From all cases, in the second and fifth cases, there are more prime numbers, so the third case remains according to which the seat numbers in the bus were: $12,13,14$ and 15, which means the teacher was accompanied by three students.