OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1001 [offset shifted by Georg Fischer, Oct 29 2019]
EXAMPLE
204 is a term:
Iteration 1: 204 = 2*2*3*17 so 204 + (2+2+3+17) = 204 + 24 = 228 and composite.
Iteration 2: 228 = 2*2*3*19 so 228 + (2+2+3+19) = 228 + 26 = 254 and composite.
Iteration 3: 254 = 2*127 so 254 + (2+127) = 254 + 129 = 383 and prime.
MATHEMATICA
nxt[n_]:=Total[Flatten[Table[#[[1]], {#[[2]]}]&/@FactorInteger[n]]]+n; Select[ Range[500], PrimeQ[NestList[nxt, #, 3]]=={False, False, False, True}&] (* Harvey P. Dale, Feb 23 2014 *)
PROG
(Magma) f:=func<n|n+(&+[j[1]*j[2]: j in Factorization(n)]) >; a:=[]; for k in [4..500] do if not IsPrime(k) and not IsPrime(f(k)) and not IsPrime(f(f(k))) and IsPrime(f(f(f(k)))) then Append(~a, k); end if; end for; a; // Marius A. Burtea, Oct 17 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Patrick De Geest, Aug 15 1999
EXTENSIONS
Name edited by Michel Marcus, Oct 17 2019
STATUS
approved