OFFSET
1,1
COMMENTS
f(x) = sum of prime factors with multiplicity, so that f(1500) = 2+2+3+5+5+5 = 22.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
spf[n_]:=Total[Flatten[Table[#[[1]], #[[2]]]&/@FactorInteger[n]]]; p4Q[n_] := Module[{lst=NestList[spf, n, 4]}, NoneTrue[Most[lst], PrimeQ] && NoneTrue[ Most[lst], #==4&]&&(PrimeQ[lst[[-1]]]||lst[[-1]]==4)]; Select[ Range[ 250], p4Q] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 17 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved