146. Count how many different $p$-arithmetic fractional-linear functions there are.

The function $f(f(x))$ is denoted by $f_{2}(x)$. Similarly, we introduce fractional-linear functions $f_{\mathrm{B}}(x), f_{1}(x), \ldots, f_{2}(x)$, assuming

$$
\begin{aligned}
f_{3}(x) & =f\left(f_{2}(x)\right), \\
f_{4}(x) & =f\left(f_{\mathrm{B}}(x)\right), \\
\cdots & \cdot \\
f_{n}(x) & =f\left(f_{n-1}(x)\right) .
\end{aligned}
$$

For example,

$$
\begin{aligned}
& f(x)=\frac{x+1}{x} \\
& f_{2}(x)=\frac{\frac{x+1}{x}+1}{\frac{x+1}{x}}=\frac{2 x+1}{x+1} \\
& f_{3}(x)=\frac{\frac{2 x+1}{x+1}+1}{\frac{2 x+1}{x+1}}=\frac{3 x+1}{2 x+1}
\end{aligned}
$$

The action of all functions $f_{n}(x)$ can be traced on a diagram constructed for the function $f(x)$. The action of the function $f(x)$ is such that each point of its diagram moves to the next one, i.e., makes one step in the direction of the arrows. When applying the function $f_{2}(x)$, each point on the diagram of $f(x)$ already makes two steps, landing in the second point. Generally, when applying $f_{n}(x)$, each point on the diagram of $f(x)$ makes $n$ steps in the direction of the arrows, jumping over $n-1$ points to the $n$-th. This allows constructing the diagrams of the functions $f_{2}(x), f_{3}(x), \ldots$ from the diagram of the function $f(x)$ without calculations.
146. Let's fix some triple of different points, for example $0,1, \infty$. Each fractional-linear function maps this triple of points to some other triple of different points $y_{1}, y_{2}, y_{3}$. Conversely, for each triple of different points $y_{1}, y_{2}, y_{3}$, one can find and uniquely determine a fractional-linear function that maps this triple to $0,1, \infty$. Therefore, the number of different $p$-arithmetic fractional-linear functions is the same as the number of different triples of points in our $p$-arithmetic, extended by the symbol $\infty$ (triples differing in order should be considered different). For $y_{1}$, we can choose any of the $p+1$ points $0,1, \ldots, p-1, \infty$, for $y_{2}$ - any of the $p$ remaining points, and finally, for $y_{3}$ we can take any of the $p-1$ points not yet chosen. Thus, there will be $(p+1) p(p-1)$ combinations, i.e., different triples of points. The same number will be for $p$-arithmetic

![](https://cdn.mathpix.com/cropped/2024_05_21_a55bead9955e32b1e916g-254.jpg?height=265&width=362&top_left_y=1288&top_left_x=682)

Pic. 152. linear fractional functions.