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 A048125 #13 Sep 20 2019 07:31:30 %S A048125 14,15,16,18,20,24,27,38,46,68,87,124,141,152,155,158,161,166,171,183, %T A048125 185,186,195,203,208,209,212,218,221,222,226,230,231,232,234,247,249, %U A048125 255,261,272,275,276,290,295,299,301,306,314,322,323,330,335,341,343 %N A048125 Becomes prime or 4 after exactly 3 iterations of f(x) = sum of prime factors of x. %C A048125 f(x) = sum of prime factors with multiplicity, so that f(1500) = 2+2+3+5+5+5 = 22. %H A048125 Andrew Howroyd, <a href="/A048125/b048125.txt">Table of n, a(n) for n = 1..10000</a> %t A048125 f[n_] := Total[Times @@@ FactorInteger[n]]; %t A048125 okQ[n_] := For[k = 3; r = n, k >= 1, k--, r = f[r]; If[r == 4 || PrimeQ[r], Return[k == 1]]]; %t A048125 Select[Range[500], okQ] (* _Jean-François Alcover_, Sep 20 2019, from PARI *) %o A048125 (PARI) sopfr(n)={my(f=factor(n)); sum(i=1, #f~, f[i,1]*f[i,2])} %o A048125 ok(n)={forstep(k=3, 1, -1, n=sopfr(n); if(n==4||isprime(n), return(k==1))); 0} %o A048125 select(ok, [1..500]) \\ _Andrew Howroyd_, Sep 14 2019 %Y A048125 Cf. A002217, A048124. %K A048125 nonn %O A048125 1,1 %A A048125 _David W. Wilson_