Better solution to an elementary number theory problem I found the following problem about elementary number thery

Alice designed a program such that it takes an integer $n>1$, and then it factors it as $a_0^{e_0}a_1^{e_1}a_2^{e_2}\cdots a_1^{e_n}$. It then calculates $r=a_0e_0+a_1e_1\cdots+a_ne_n+1$ and repeats the process with $r$. Show that it always end in a periodic sequence, and find every possible period.

My solution:
Define $f(x)$ and $\rightarrow$  as an iteration of the program.
Lemma 1.1:For every natural $x\ge3$, we have $x^2>2x+2$
Proof: 
$$x-1\ge2\implies x^2\ge2x+3>2x+2$$
Lemma 1.2:For every naturals $s\ge2$ and $x\ge3$, we have $x^s>sx+2$
Proof: 
Inductive hypothesis:$x^k\ge xk+2$ $\forall x\ge2\in\mathbb{N}$.Therefore
$$x^{s+1}\ge sx^2+2x > sx+x+1=x(s+1)+2$$
Using lemma 1.1 as basecase, we finish the proof.
Lemma 1.3:For every different primes $p,q$, we have $f(pq)\le pq$
Proof: 
Let  wlog $p<q$
Then, $p\ge2$,$p\ge3$,$p\neq q$
$$p-1\ge1$$
$$q-1\ge2$$
$$pq-q-p+1\ge2$$
$$pq\ge q+p+1$$
$$pq\ge f(pq)$$
And equality is attained iff $p=2,q=3$
Lemma 1.4:For every $x\in\mathbb{N}$ more than $2$ prime factors and at least two different ones, we have $f(x)<x$
Proof: 
From Lemma 1.3 we know that if $p$ and $q$ are different primes
$$pq\ge q+p+1$$
Multiply by a prime $x$ both sides
$$xpq\ge x(q+p)+x>p+q+1+x$$
So $xpq>f(xpq)$ for every prime $x$
Since we want to show that $f(ypq)<ypq$ $\forall y\ge2$, we can multiply by its prime factors $x$ a finite number of times  and likewise obtain the result.
Then, from Lemma 1.2 we know that $p^k>f(p^k)+1$ for all $k\ge2$,$p\ge3$.
But we don't know what happens when $k=1$ or $p=2$.
If $p=2$ then
$$f(2^k)=2k+1$$
Since we know $2^3\ge 2*3+2$ we use the proof of Lemma 1.2 to verify $2^s>2s+2$ for $s>3$
Then we are left with
$$f(2)=3\rightarrow 4\rightarrow 5\rightarrow 6\rightarrow 6$$
$$f(4)=5\rightarrow 6\rightarrow 6$$
$$f(8)=7\rightarrow 8$$
And $2^s>f(2^s)+1$ for $s>3$. So if $p+1$ is a number of the form $2^s$ where $s>3$ $p\rightarrow p+1=2^s\rightarrow 2s+1<2^s-1=p$, and we note that after two iterations the number has decreased.
If $k=1$, then we have
$$f(p)=p+1$$
If $p\neq2$(we have dealt with that case before), then
$f(p)=2k$ for some integer k\ge2$
Then, either $2k$ is a power of $2$ or it is not.
If it is, then we have dealt with that case before and we are done.
If it is not, then $2k$ has two or more prime factors.
If it has $2$, we know from lemma 1.3 that we achieve equality iff $p=6$ and that the iterations are decreasing elsewhere.
If it has more than $2$, since we have dealt with perfect powers before we know it has at least two different factors, and Lemma 1.4 says there is no more solutions and the iteration is decreasing.
Answer: $7\rightarrow8\rightarrow7$ and $6\rightarrow6$
Question: Was there an easier, faster way to solve this?

Lemma 1: If $ x $ is a prime, then $f(x) = x+1$. 
Lemma 2: If $x = mn$ (not necessarily coprime), then $f(mn) - 1 = [f(m) - 1] + [f(n) - 1 ]$.
I consider this the crux of the function. This is easily proved (once you know it).
Now check that $f(4) = 5$, $f(6) = 6$ and $f(8) = 7$.
Lemma 3: $f(x) \leq x+1$.
Lemma 4: If $ x\geq 9$ is composite, then $f(x) \leq x-2 $.
Let $x=mn$, then we want to show that $f(mn) \leq f(m) + f(n) -1 \leq m+n+1 \leq mn-2.$
The last inequality is true because $(m-1)(n-1) \geq 4$.
Lemma 5: If $x \geq 9$, then $f(f(x)) \leq x-1 < x$.
Corollary: Every sequence of $f^{(i)}(x)$ is eventually periodic.
Corollary: If $x \geq 9$, then $x$ doesn't appear in a periodic sequence. We just have to check $f(x)$ for $x=1$ to 8 to find the various periodic sequences.
