For real number \( x \), let
\[ f(x) = \begin{cases} \frac{1}{1+x}, & \text{if } x \text{ is non-negative} \\ 1 + x, & \text{if } x \text{ is negative} \end{cases} \]
\[ f^n(x) = f\left(f^{n-1}(x)\right), \quad n = 2, 3, \dots \]
We are given:
Applying the function once: \[ f(x_0) = 1 + x_0 = 1 - r \] Since \( r \geq 2 \), we have \( 1 - r \leq -1 < 0 \). Therefore, after the first step, the value remains negative.
While the value remains negative, the iteration rule is: \[ f(x) = 1 + x \] Therefore, for \( k \leq r \): \[ f^k(-r) = -r + k \]
When \( k = r - 1 \): \[ f^{r-1}(-r) = -r + (r - 1) = -1 \] When \( k = r \): \[ f^{r}(-r) = -r + r = 0 \]
For non-negative inputs, we use: \[ f(x) = \frac{1}{1 + x} \] Therefore: \[ f^{r+1}(-r) = f(0) = \frac{1}{1 + 0} = 1 \]
The sum of the three consecutive values is: \[ (-1) + 0 + 1 = 0 \] This confirms that: \[ \boxed{0} \]
The sum is always \(0\) for \( r \geq 2 \), matching the correct option (2).
When $10^{100}$ is divided by 7, the remainder is ?