A029914 Start with n; repeatedly sum squares of prime factors (counted with multiplicity), until reach a prime p, then set a(n) = p; if reach a fixed point q, set a(n) = q; set a(n) = 0 if no limit exists.
17, 59, 17, 31, 13
Offset: 2
Examples
2 -> 2^2 = 4 -> 2^2 + 2^2 = 8 -> 2^2 + 2^2 + 2^12 = 12 -> 2^2 + 2^2 + 3^2 = 17, prime, so stop; a(2)=17.
Crossrefs
Cf. A029913.
Extensions
More terms from Michel ten Voorde, Apr 12 2001
Incorrect extension reverted by Sean A. Irvine, Mar 08 2020