5. In the sum $1+3+5+\ldots+k$ of consecutive odd natural numbers, determine the largest addend $k$ such that $1+3+5+\ldots+k=40000$.

## Tasks worth 10 points:
First method:

Determine the sum by subtracting the even addends from the total sum of consecutive natural numbers from 1 to $k$.

$1+2+3+\ldots+k-(2+4+6+\ldots+(k-1))=40000$

$\frac{k \cdot(k-1)}{2}-2 \cdot\left(1+2+3+\ldots+\frac{k-1}{2}\right)=40000$

$\frac{k \cdot(k-1)}{2}-2 \cdot \frac{\frac{k-1}{2} \cdot\left(\frac{k-1}{2}+1\right)}{2}=40000$,

$1 \text{ POINT}$

which is equivalent to the quadratic equation

$k^{2}+2 k+1=160000$

$(k+1)^{2}=160000$.

The possibility $k+1=-400$ or $k=-401$ is discarded because $k$ is a natural number.

$k+1=400$

$k=399$

$1 \text{ POINT}$

Since $k$ is a natural number, the largest addend in the sum is 399.

TOTAL 6 POINTS