A048124 Becomes prime or 4 after exactly 2 iterations of f(x) = sum of prime factors of x.
8, 9, 21, 25, 30, 32, 35, 36, 42, 50, 57, 60, 64, 72, 81, 85, 86, 93, 102, 111, 115, 121, 122, 138, 145, 146, 159, 164, 174, 182, 187, 194, 215, 219, 235, 236, 237, 253, 258, 260, 265, 266, 282, 284, 287, 289, 302, 303, 308, 312, 318, 319, 326, 329, 338, 346
Offset: 1
Keywords
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
okQ[n_]:=Module[{lst=NestList[Total[Times@@@FactorInteger[#]]&,n,2]}, !PrimeQ[First[lst]] &&!PrimeQ[lst[[2]]]&&First[lst]!=4&&lst[[2]]!=4&&(PrimeQ[Last[lst]]||Last[lst]==4)]; Select[Range[400], okQ] (* Harvey P. Dale, Mar 23 2011 *)
-
PARI
sopfr(n)={my(f=factor(n)); sum(i=1, #f~, f[i,1]*f[i,2])} ok(n)={forstep(k=2, 1, -1, n=sopfr(n); if(n==4||isprime(n), return(k==1))); 0} select(ok, [1..500]) \\ Andrew Howroyd, Sep 14 2019
Comments