5. A sequence of positive rational numbers is given as follows:

$$
\frac{1}{1}, \frac{2}{1}, \frac{1}{2}, \frac{3}{1}, \frac{2}{2}, \frac{1}{3}, \frac{4}{1}, \frac{3}{2}, \frac{2}{3}, \frac{1}{4}, \frac{5}{1}, \frac{4}{2}, \frac{3}{3}, \frac{2}{4}, \frac{1}{5}, \ldots
$$

Determine the position at which the number $\frac{2014}{2015}$ appears.
Solution. The members of the sequence are divided into groups as follows: there is one member whose sum of the numerator and denominator is 2, there are two members of the sequence whose sum of the numerator and denominator is 3, there are three members of the sequence whose sum of the numerator and denominator is 4, etc. There are $n$ members whose sum of the numerator and denominator is $n+1$. The fraction $\frac{2014}{2015}$ has a sum of 4029. This means that before it, there are

$$
\begin{aligned}
1+2+3+\ldots+4027 & =(1+4026)+(2+4025)+\ldots+(2013+2014)+4027 \\
& =2014 \cdot 4027 \\
& =8110378
\end{aligned}
$$

members whose sum of the numerator and denominator is less than 4029. In the last group with the sum of 4029, before the desired fraction are the numbers $\frac{4028}{1}, \frac{4027}{2}, \frac{4026}{3}, \frac{4025}{4}, \ldots, \frac{2014}{2015}$. Therefore, the fraction $\frac{2014}{2015}$ is located at

$$
8110378+2014+1=8112393 \text { position. }
$$

## IX Department