Definition:Recurring Digital Invariant

Definition
Let $k \in \Z_{>0}$ be a positive integer.

Let $f: \Z_{>0} \to \Z_{>0}$ be the mapping defined as:


 * $\forall m \in \Z_{>0}: f \left({m}\right) = $ the sum of the $k$th powers of the digits of $n$.

Let $n_0 \in \Z_{>0}$ be a positive integer.

Consider the sequence:
 * $s_n = \begin{cases} n_0 & : n = 0 \\

f \left({s_{n - 1} }\right) & : n > 0 \end{cases}$

If:
 * $\exists r \in \N_{>0}: s_r = n_0$

then the smallest of the terms $n_0, n_1, \ldots, n_r$ is a recurring digital invariant of order $k$.