# 2017th edition

**Number Theory**Level 4

We have a peculiar series in which a lead number \((say \space a_{1})\) is written first and then the number of consecutive numbers \((say \space a_{2}, a_{3}, \dots)\) that follow the lead number (including the lead number) is equal to the lead number itself i.e. \(\underbrace{a_{1}, a_{2}, a_{3}, \dots, a_{a-2}, a_{a-1}, a_{a}}\). And then we continue the series with the number \( a_{2}\) and follow the same procedure.

If the series starts from 1 as \(\{\)1, \( \, \) 2, 3, \( \, \) 3, 4, 5, \( \, \) 4, 5, 6, 7, \( \) ...\(\} \), find the smallest \(n\), where the \(n\)th term \(a_n=2017\).

\[\underbrace{\color{blue}{1}}_\color{blue}{1}, \underbrace{\color{blue}{2}, 3}_\color{blue}{2}, \underbrace{\color{blue}{3}, 4,5}_\color{blue}{3}, \underbrace{\color{blue}{4}, 5,6,7}_\color{blue}{4},... \]

The series above comprises segments of a leader integer (blue) followed by consecutive follower integers such that, if a segment starts with a leader integer \(\color{blue}{k}\), it is followed by \(k-1\) follower integers: \(k+1\), \(k+2\), \(k+3 \),... \(k+k-1\), before the next segment, which starts with leader integer \(\color{blue}{k+1}\).

Find the smallest \(n\) such that the \(n\)th term of the series is 2017.