Arrange the positive integers into two lines as follows:
\begin{align*} 1 \quad 3 \qquad 6 \qquad\qquad\quad 11 \qquad\qquad\qquad\qquad\quad\ 19\qquad\qquad32\qquad\qquad 53\ldots\\
\mbox{\ \ } 2 \quad 4\ \ 5 \quad 7\ \ 8\ \ 9\ \ 10\quad\ 12\ 13\ 14\ 15\ 16\ 17\ 18\quad\ 20 \mbox{ to } 31\quad\ 33 \mbox{ to } 52\quad\ \ldots\end{align*} We start with writing $1$ in the upper line, $2$ in the lower line and $3$ again in the upper line. Afterwards, we alternately write one single integer in the upper line and a block of integers in the lower line. The number of consecutive integers in a block is determined by the first number in the previous block.
Let $a_1$, $a_2$, $a_3$, $\ldots$ be the numbers in the upper line. Give an explicit formula for $a_n$.
To find an explicit formula for \(a_n\), the numbers in the upper line, we need to analyze the pattern and sequence of the numbers in the lower line.

1. **Identify the sequence in the lower line:**
   The sequence of the number of consecutive integers in the lower line is given by \(x_n\), which starts as \(1, 2, 4, 7, 12, 20, \ldots\). We observe that:
   \[
   x_{n+2} = x_{n+1} + x_n + 1
   \]
   This recurrence relation can be transformed by defining \(y_n = x_n + 1\). Then:
   \[
   y_{n+2} = y_{n+1} + y_n
   \]
   This is the recurrence relation for the Fibonacci sequence, shifted by two indices.

2. **Relate \(y_n\) to the Fibonacci sequence:**
   The Fibonacci sequence \(F_n\) is defined as:
   \[
   F_1 = 1, \quad F_2 = 1, \quad F_{n+2} = F_{n+1} + F_n
   \]
   Given the initial terms of \(x_n\), we can match them to the shifted Fibonacci sequence:
   \[
   y_n = F_{n+2}
   \]
   Therefore:
   \[
   x_n = F_{n+2} - 1
   \]

3. **Determine the formula for \(a_n\):**
   The numbers in the upper line \(a_n\) are given by the first number in the next block of the lower line minus one. Thus:
   \[
   a_n = x_{n+1} - 1
   \]
   Substituting \(x_{n+1} = F_{n+3} - 1\):
   \[
   a_n = (F_{n+3} - 1) - 1 = F_{n+3} - 2
   \]

4. **Conclusion:**
   The explicit formula for \(a_n\) is:
   \[
   a_n = F_{n+3} - 2
   \]

The final answer is \(\boxed{a_n = F_{n+3} - 2}\).