login
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.
1

%I #13 Mar 08 2020 23:54:05

%S 17,59,17,31,13

%N 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.

%e 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.

%Y Cf. A029913.

%K nonn,more

%O 2,1

%A _Dann Toliver_

%E More terms from _Michel ten Voorde_, Apr 12 2001

%E Incorrect extension reverted by _Sean A. Irvine_, Mar 08 2020