My solution to problem 34 is as follows:
The solution set is
S=$\left \{ \forall r\in\mathbb{N}\cup\left \{ +\infty\ \right \}|\;f_r(n)= \begin{cases} & n, \ {if }\ n<r \\ & n+1, \ { if }\ n\geqslant r \end{cases} \right \}$
We start by defining
$a_k$:= min{f(i)|$i\in\mathbb{N},i\geqslant k$}. For $\forall k \in\mathbb{N}, a_k$ is well-defined because $\mathbb{N}$ is well-ordered.
Also $S_k$:= {j|$j\in\mathbb{N}\ , \ j\geqslant k\ , \ f(j) = a_k$}. This must be non-empty; for $\forall k\in\mathbb{N}$, again.
We introduce the following lemma.
Lemma: Any solution f is strictly-increasing.
Proof: We’ll inductively show that for all n $\in\mathbb{N}$; for any m>n, f(m) > f(n) holds. But before that, we observe that for $\forall n\in\mathbb{N},\
f(n+1)> \frac{f(f(n))+f(n)}{2} \geqslant$ min{f(n), f(f(n))} …….(1)
So if for some i>1, i$\in S_1$;using (1), f(i) > f(i-1) or f(i)> f(f(i-1)), where f(i)=$a_1$; a contradiction.
So for i>1; f(i)>$a_1$. But as $S_1 \neq$ {}, $S_1$={1}; so $a_1$=f(1). This is the base step.
Now assume that the hypothesis is true for n=1,2,…,k. Suppose for some i>k+1; i$\in S_{k+1}$. Then using (1) again, f(i) > f(i-1) or f(i)> f(f(i-1)). The first is impossible as (i-1)$ \geqslant$k+1, while f(i)=$a_{k+1}$. If the second is true , we must have f(i-1) < k+1; for the same reason. But (i-1) > k, so the inductive hypothesis implies that
1$ \leqslant$f(1) < f(2) < ……<f(k) < f(i-1) < k+1.
This is clearly a contradiction because (k+1) distinct integers can’t exist in the interval [1,k+1).
So for $\forall $ i> k+1; f(i)> $a_{k+1}$. We now simply note that as $ S_{k+1} \neq${}, $ S_{k+1}$={k+1} and so $a_{k+1}$=f(k+1). This completes the induction.
With the lemma; we have $\forall n \in\mathbb{N}, f(n) \geqslant$ n. Further, if $\exists t\in\mathbb{N} : \exists c\in\mathbb{N}_0, f(t) \geqslant t+c$; then for $\forall j\geqslant t, f(j) \geqslant j+c.$
Suppose there exists such t$\in\mathbb{N}$ so that we can choose c=2. We now define
$b_i := f(t+i) – f(t+i-1)$, for $\forall i\in\mathbb{N}.$ By the lemma, $\forall i\in\mathbb{N}, b_i\in\mathbb{N}.$
Now for $\forall s \geqslant t, f(s) \geqslant $ s+2. The lemma gives that f(f(s)) $\geqslant f(s+2).$
Then for $\forall i\in\mathbb{N}; \
f(t+i) > \frac{f(t+i-1)+f(f(t+i-1))}{2} \geqslant \frac{f(t+i-1)+f(t+i+1)} {2}$
$\Rightarrow b_i$= f(t+i) – f(t+i-1) > f(t+i+1)- f(t+i) = $b_{i+1}$.
This gives $b_1>b_2>b_3>…….;$ an infinite strictly decreasing sequence of positive integers, clearly a contradiction.
Now we are only left with the set S from which f can come. Our final claim is that: any f in S is a solution.
When r=+$\infty$, f(n)=n for $\forall n \in\mathbb{N}$; is obviously a solution.
Let r< +$\infty$. For n $ \geqslant r, f(f(n))=f(n+1)=n+2. $
$\Rightarrow n+2 = f(n+1) > n+1.5 = \frac{(n+2)+(n+1)}{2} = \frac{f(f(n))+f(n)}{2}. $
If n<r-1 or n=r-1 for some n$\in\mathbb{N}$, then respectively f(n+1) = n+1 or f(n+1) = n+2; in both cases greater than
$\frac{f(f(n))+f(n)}{2} = \frac{n+n}{2} = n.$
So we have established our claim.