A050778 Primes that are ending primes after the iterated procedure of 'composite added to the sum of its prime factors reaches a prime'.
11, 17, 19, 23, 29, 31, 41, 47, 53, 59, 71, 79, 83, 89, 103, 107, 109, 113, 127, 131, 149, 151, 167, 179, 191, 227, 229, 239, 241, 251, 263, 269, 271, 293, 311, 313, 317, 331, 337, 359, 373, 383, 401, 419, 431, 439, 443, 449, 461, 467, 479, 491, 503, 509, 521
Offset: 1
Keywords
Examples
383 is ending prime for the following composites 182, 204, 218, 226, 228, 254, 329 and 341. For instance 341 (=11*31) -> 341 + (11+31) = 341 + 42 = 383.
Programs
-
Mathematica
a[n_]:=NestWhile[#+Total[Times@@@FactorInteger[#]]&,n,!PrimeQ[#]&]; t={}; Do[If[!PrimeQ[n],AppendTo[t,a[n]]],{n,4,nn=522}]; Select[Union[t],#
Jayanta Basu, Jun 01 2013 *)