Proof Check: Let $f_{0}(x)=\frac{1}{1-x},$ and $f_{n}(x)=f_{0}(f_{n-1}(x))$ for any positive integer $n$. Find $f_{2018}(2018)$ Let us denote by $F$ the set of real-valued functions of a real variable such that $$F=\left\{\frac{1}{1-x},\frac{x-1}{x},x\right\}.$$ We shall prove that this set forms an abelian group under the compositon of functions. We first notice that the set has closure and is commutative. Indeed,
                \begin{alignat*}{2}
     \left(x\right)\circ\left(\frac{1}{1-x}\right) &= \left(\frac{1}{1-x}\right)\in F &&= \left(\frac{1}{1-x}\right)\circ \left(x\right)\\
     \left(x\right)\circ\left(\frac{x-1}{x}\right) &= \left(\frac{x-1}{x}\right)\in F &&= \left(\frac{x-1}{x}\right)\circ \left(x\right)\tag{1}\\
     \left(\frac{1}{1-x}\right)\circ\left(\frac{x-1}{x}\right) &= \ \quad\left(x\right)\in F &&= \left(\frac{x-1}{x}\right)\circ \left(\frac{x-1}{x}\right).
    \end{alignat*}
        Now, we clain that $x$ is the identity element of the set. Indeed,
                \begin{alignat*}{2}
     \left(x\right)\circ\left(\frac{1}{1-x}\right) &= \left(\frac{1}{1-x}\right)\circ \left(x\right) &&= \frac{1}{1-x}\\
     \left(x\right)\circ\left(\frac{x-1}{x}\right) &= \left(\frac{x-1}{x}\right)\circ \left(x\right) &&= \frac{x-1}{x}\tag{2}
    \end{alignat*}
$$     \left(x\right)\circ\left(x\right) = x.$$
Moreover, we see from (1) and (2) that every element is invertible, hence the set forms an abelian group under the composition operator. We would now like to show that $F$ is a cyclic group:
Let us define the $n^{\text{th}}$ power $f^{n}$ of an element of $f\text{ of } F$ as the following
$$f^n =\begin{cases}
   e & : n = 0 \\
   f^{n-1} \circ f & : n > 0 \\
  \left({f^{-n}}\right)^{-1} & : n < 0
  \end{cases}$$
where $e$ is the identity element of $F.$ We have to prove that every element in $F$ can be expressed as the power of a single element from $F$. We claim this generator is $\frac{1}{1-x}$. Indeed,
            $$\frac{1}{1-x}^{0}=x,\qquad \frac{1}{1-x}^{1}=\frac{1}{1-x},\qquad \frac{1}{1-x}^{2}=\frac{x-1}{x},\\$$
hence $F$ is the cyclic group of order 2 generated by $\frac{1}{1-x}$. Namely, 
$$ F=\left\{\frac{1}{1-x}^{0},\frac{1}{1-x}^{1},\frac{1}{1-x}^{2}  \right\}=\left<\frac{1}{1-x}\right>.\\$$
All cyclic groups of equal order being isomorphic to each other, consider the bijection $\phi\colon\mathbb{Z}/3\mathbb{Z}\to{F}\colon\phi(2^{n})=\frac{1}{1-x}^{n}$. We would like to show this is a homomorphism from $\mathbb{Z}/3\mathbb{Z}$ to $F$. 
Note that $\phi(2^{n})=\frac{1}{1-x}^{n}$ holds for all $n$, for let $n$ be an integer such that $n = q k + r$ for $0 \le r < k$. Now
$$
 2^n = 2^r,\qquad \text{and}\qquad \frac{1}{1-x}^r = \frac{1}{1-x}^n,\\
$$
thus
$$
 \phi (2^{n}) = \phi (2^{r}) = \frac{1}{1-x}^r = \frac{1}{1-x}^n.
$$
Now let $x,y$ be in $\mathbb{Z}/3\mathbb{Z}$. Since $\mathbb{Z}/3\mathbb{Z}=<2>,$ it follows that there exist integers $s,t$ such that 
    $$x=2^{s} ,\qquad \text{and}\qquad  y=2^{r}, $$
thus,
        \begin{align*}
   \phi(xy)&=\phi(2^{s}2^{t})\\
   \qquad &=\phi(2^{s+t})\\
   \qquad &=\frac{1}{1-x}^{s+t}\\
   \qquad &=\frac{1}{1-x}^{s}\frac{1}{1-x}^{t}\\
   \qquad &=\phi(2^{s})\phi(2^{t})\\
   \qquad &=\phi(x)\phi(y)
  \end{align*}
so $\phi$ is a homomorphism. As $\phi$ is a bijection, then it is also an isomorphism from $\mathbb{Z}/3\mathbb{Z}$ to $F$, hence $\mathbb{Z}/3\mathbb{Z} \cong F$, as desired. Lastly, let $h\colon \mathbb{N}\to \mathbb{Z}/3\mathbb{Z}$ be a function mapping a positive integer into its equivalence class modulo 3. Then
\begin{alignat*}{4}
   &\qquad \qquad \qquad \qquad \quad f_{2018}(x)&&=(\phi\circ h)(x)\\
   &              &&=\phi(h(2018))(x)\\
   &              &&=\phi(2)(x)\\
   &              &&=\phi(2)(x)=\frac{1}{1-x}^2\\
   &              &&=x\\
   &\qquad \qquad \qquad \quad \implies f_{2018}(2018)        &&=2018
     \end{alignat*}

Another method: 
Check that : $$f_0(x)=\frac {1}{1-x}$$
$$f_1(x)=1-\frac 1x$$
$$f_2(x)= x$$
And now hereafter it would be quite obvious that $$f_n(x) =
\begin{cases}
\frac{1}{1-x},  & \text{if $n=3k$} \\
1-\frac 1x, & \text{if $n=3k+1$} \\
x, & \text{if $n=3k+2$}
\end{cases}$$
