This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A361685 #21 Jan 28 2025 15:30:14 %S A361685 0,0,1,0,1,0,1,1,1,0,1,0,2,2,1,0,1,0,1,2,1,0,1,1,3,1,2,0,2,0,1,3,1,2, %T A361685 1,0,3,2,1,0,2,0,1,2,2,0,1,1,1,2,3,0,1,2,2,2,1,0,2,0,4,2,1,2,2,0,1,4, %U A361685 3,0,1,0,3,2,3,2,2,0,1,1,1,0,2,2,3,2,1,0,2,2,2,2,2,2,1,0,2,3,1,0 %N A361685 Number of iterations of sopf until reaching a prime. %H A361685 Antti Karttunen, <a href="/A361685/b361685.txt">Table of n, a(n) for n = 2..65537</a> %F A361685 For n >= 2, a(n) = min{m : sopf^m(n) is prime} where sopf^m indicates m iterations of sopf, the sum of the prime factors function. %F A361685 a(n) = A321944(n) - 1. - _Rémy Sigrist_, Mar 29 2023 %e A361685 a(15) = 2 because 15 is not prime, sopf(15) = 8 is not prime, and sopf^2(15) = sopf(8) = 2 is prime. %e A361685 a(16) = 1 because 16 is not prime and sopf(16) = 2 is prime. %e A361685 a(17) = 0 because 17 is prime. %o A361685 (MATLAB) %o A361685 for n=2:101 %o A361685 s = n; %o A361685 c = 0; %o A361685 while ~isprime(s) %o A361685 s = sum(unique(factor(s))); %o A361685 c = c + 1; %o A361685 end %o A361685 a(n) = c; %o A361685 end %o A361685 (PARI) %o A361685 A008472(n) = vecsum(factor(n)[, 1]); %o A361685 A361685(n) = for(k=0,oo,if(isprime(n),return(k)); n = A008472(n)); \\ _Antti Karttunen_, Jan 28 2025 %Y A361685 Cf. A008472 (sopf), A321944. %K A361685 nonn %O A361685 2,13 %A A361685 _J. W. Montgomery_, Mar 29 2023