Emília's tree grows according to the following rule: two weeks after a branch appears, that branch produces a new branch every week, and the original branch continues to grow. After five weeks, the tree has five branches, as shown in the figure. How many branches, including the main branch, will the tree have at the end of eight weeks?

![](https://cdn.mathpix.com/cropped/2024_05_01_30c9a294a58a6e4b8190g-018.jpg?height=320&width=275&top_left_y=1165&top_left_x=1553)
Let $g_{n}$ denote the number of branches on the tree after $n$ weeks. Since only after two weeks does a branch appear, $g_{2}=1$. In the third week, this branch produces a new branch, that is, $g_{3}=2$. The number of branches in a week is equal to the number of branches that existed in the previous week, plus the new branches.

![](https://cdn.mathpix.com/cropped/2024_05_01_30c9a294a58a6e4b8190g-072.jpg?height=291&width=252&top_left_y=994&top_left_x=1576)

However, according to the given rule, new branches grow from branches that are at least two weeks old, that is, in week $n+1$, there is a new branch for each branch that already existed in week $n-1$. Thus, we have $g_{n+1}=g_{n}+g_{n-1}$, so starting from $g_{2}=1$ and $g_{3}=2$, we get

$$
\begin{aligned}
& g_{4}=2+1=3 \\
& g_{5}=3+2=5 \\
& g_{6}=5+3=8 \\
& g_{7}=8+5=13 \\
& g_{8}=13+8=21
\end{aligned}
$$

At the end of eight weeks, Emília's tree will have a total of 21 branches.