2. The sum of consecutive natural numbers is 2023. How many addends can that sum have?
2. The sum of consecutive natural numbers is 2023. How many addends can this sum have?

## Solution.

Let $n$ be the first and $n+m$ be the last addend of this sum. Clearly, this sum has $m+1$ addends.

$$
\begin{aligned}
& n+(n+1)+(n+2)+\ldots+(n+m)=2023 \\
& \underbrace{(n+n+\ldots+n)}_{m+1}+(1+2+\ldots+m)=2023 \\
& (m+1) n+(1+2+\ldots+m)=2023
\end{aligned}
$$

$$
\begin{aligned}
& (m+1) n+\frac{m(m+1)}{2}=2023 \\
& 2(m+1) n+m(m+1)=4046 \\
& (m+1)(2 n+m)=4046
\end{aligned}
$$

Determine the prime factors of the number 4046.

$4046=2 \cdot 7 \cdot 17 \cdot 17$

Since $m$ and $n$ are natural numbers, it follows that:

$m+1 \neq 1$

$2 n+m \neq 1$

$2 n+m>m+1$

| $m+1$ | $2 n+m$ | $m$ | $2 n$ | $n$ |
| :---: | :---: | :---: | :---: | :---: |
| 2 | 2023 | 1 | 2022 | 1011 |
| 7 | 578 | 6 | 572 | 286 |
| 17 | 238 | 16 | 222 | 111 |
| 14 | 289 | 13 | 276 | 138 |
| 34 | 119 | 33 | 86 | 43 |
| 119 | 34 | 118 | $-84 \notin \square$ | $/$ |

Notice that after $m+1=34$, $2 n+m<m+1$.

Therefore, the condition is not met, and there is no need to continue the sequence. We conclude that the desired sum can have 2, 7, 14, 17, or 34 addends.