OFFSET
1,1
COMMENTS
f(x) = sum of prime factors with multiplicity, so that f(1500) = 2+2+3+5+5+5 = 22.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
MATHEMATICA
f[n_] := Total[Times @@@ FactorInteger[n]];
okQ[n_] := For[k = 3; r = n, k >= 1, k--, r = f[r]; If[r == 4 || PrimeQ[r], Return[k == 1]]];
Select[Range[500], okQ] (* Jean-François Alcover, Sep 20 2019, from PARI *)
PROG
(PARI) sopfr(n)={my(f=factor(n)); sum(i=1, #f~, f[i, 1]*f[i, 2])}
ok(n)={forstep(k=3, 1, -1, n=sopfr(n); if(n==4||isprime(n), return(k==1))); 0}
select(ok, [1..500]) \\ Andrew Howroyd, Sep 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved