OFFSET
1,2
COMMENTS
This sequence is well defined as A007770 contains arbitrarily long subsequences of consecutive terms.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
PROG
(PARI) a(n) = { forstep (m = n, oo, n, my (h = m, d); while (h > 6, d = digits(h); h = sum(k = 1, #d, d[k]^2)); if (h == 1, return (m))) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 26 2023
STATUS
approved