We write 1s at the two endpoints of a segment. Then, step by step, we halve the resulting segments and write the sum of the numbers at the two ends of the segments to the midpoint. Repeating the halving of the segments one million times, what will be the sum of the numbers written?
I. solution. Instead of examining the original problem, let's consider a similar one: take a circle. Mark one of its points and write a 1 there. Then proceed with the bisections as in the original problem, but here we bisect arcs instead of segments. In each bisection, we bisect all arcs created in the previous step, and write numbers at the bisection points, each of which is the sum of the two adjacent numbers from the previous step. Every previous point is the endpoint of two arcs, so each number appears exactly twice as an addend. Thus, the sum of the new numbers is exactly double the original, meaning that with each bisection, the total sum triples. Therefore, after one million bisections, the sum is $3^{10^{6}}$.

Now let's return to the original problem! If we "straighten" the arc after the bisections, cutting off at the original 1, we get exactly the segment mentioned in the problem. The only difference is that this way we get two 1s instead of one, at the two endpoints. Thus, the solution to the problem is: $3^{10^{6}}+1$.

II. solution. The problem can also be solved simply by complete induction. If the sum after the $k$-th bisection is $s_{k}$, in the next step the sum of the numbers increases to almost three times, since the two extreme 1s only appear in one sum, so $s_{k+1}=3 \cdot s_{k}-2$. We prove that $s_{k}=3^{k}+1$. This is true for $k=1$, since $s_{1}=4=3^{1}+1$. Assuming it is true for $k$, it follows for $(k+1)$:

$$
s_{k+1}=3 \cdot\left(3^{k}+1\right)-2=3^{k+1}+1
$$

From this, $s_{1000000}=3^{10^{6}}+1$.