Let $f(n)$ denote the sum of the squares of the prime factors of $n$ with multiplicity.
For example, $f(60)=f(2\cdot2\cdot3\cdot5)=2^2+2^2+3^2+5^2=42$.
Denote the iterated function $f^k(n)=\underbrace{f(f(\dots(n)))}_{k\text{ times}}$.
For example, $f^2(60)=f(f(60))=f(42)=2^2+3^2+7^2=62$.
I want to know if there exists $k$ such that $f^k(30)$ is either prime or equal to $30$.
Is there a way to answer this question without applying a full "brute-force" search?
My goal is to be able to answer this question in general (for values other than $30$).
Side note: I do not know any cases where $f^k(n)=n$, other than $n=16$ and $n=27$.