login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Composites c that reach a prime after 3 iterations of c -> c + sum of prime factors of c.
7

%I #30 Sep 08 2022 08:44:58

%S 4,16,27,28,30,42,76,87,92,95,108,114,120,124,128,133,136,147,148,154,

%T 172,196,202,204,216,222,238,242,243,244,245,255,256,260,285,286,292,

%U 308,310,325,338,340,342,350,386,412,418,422,423,426,435,440,458,464

%N Composites c that reach a prime after 3 iterations of c -> c + sum of prime factors of c.

%H Vincenzo Librandi, <a href="/A050707/b050707.txt">Table of n, a(n) for n = 1..1001</a> [offset shifted by _Georg Fischer_, Oct 29 2019]

%e 204 is a term:

%e Iteration 1: 204 = 2*2*3*17 so 204 + (2+2+3+17) = 204 + 24 = 228 and composite.

%e Iteration 2: 228 = 2*2*3*19 so 228 + (2+2+3+19) = 228 + 26 = 254 and composite.

%e Iteration 3: 254 = 2*127 so 254 + (2+127) = 254 + 129 = 383 and prime.

%t 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 *)

%o (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

%Y Cf. A050703, A050704, A050705, A050706, A050708, A050709, A050710.

%K nonn

%O 1,1

%A _Patrick De Geest_, Aug 15 1999

%E Name edited by _Michel Marcus_, Oct 17 2019