This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A016837 #30 Sep 16 2022 04:03:43 %S A016837 23,11,23,17,11,23,23,23,17,47,19,41,23,23,47,53,41,59,29,31,47,71,47, %T A016837 47,41,71,71,89,71,167,83,47,53,47,71,113,59,71,71,269,83,131,59,167, %U A016837 71,167,59,149,167,71,167,191,83,71,167,79,89,179,251,227,167,149,149,83,269,239,89,167,251,263,251,251,113,239,149,167 %N A016837 Primes reached after k iterations of sum of n and its prime divisors = t (where t replaces n in each iteration). %C A016837 Patrick asked what composite would produce 666 or 313 iterations. Carlos has also been working on the problem and asks if there is a run of 3 primes produced by consecutive composites. So original idea belongs to Patrick. This sequence was calculated by Enoch. %H A016837 Robert Israel, <a href="/A016837/b016837.txt">Table of n, a(n) for n = 2..10000</a> %H A016837 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=940">Encyclopedia of Combinatorial Structures 940</a> %F A016837 Factor n, add n and its prime divisors. Sum = t, t replaces n, repeat until a prime is produced. %e A016837 Starting from 4, 4=2*2, so 4+2+2=8. 8=2*2*2 so 8+2+2+2=14. 14=2*7 so 14+2+7=23, prime is 23 in 3 iterations. %p A016837 f:= proc(n) option remember; local t; %p A016837 t:= n + add(f[1]*f[2],f=ifactors(n)[2]); %p A016837 if isprime(t) then return t %p A016837 else f(t) %p A016837 fi; %p A016837 end proc: %p A016837 map(f, [$2 .. 100]); # _Robert Israel_, Jul 24 2015 %t A016837 a[n_] := a[n] = Module[{t, f = FactorInteger[n]}, t = n + f[[All, 1]].f[[All, 2]]; If[PrimeQ[t], Return[t], a[t]]]; %t A016837 Table[a[n], {n, 2, 100}] (* _Jean-François Alcover_, Sep 16 2022 *) %o A016837 (PARI) sfpn(n) = {my(f = factor(n)); n + sum(k=1, #f~, f[k,1]*f[k,2]);} %o A016837 a(n) = {while (! isprime(t=sfpn(n)), n=t); t;} \\ _Michel Marcus_, Jul 24 2015 %Y A016837 Cf. A096461, A018845. %K A016837 easy,nonn %O A016837 2,1 %A A016837 _Enoch Haga_, _Carlos Rivera_, _Patrick De Geest_ %E A016837 Corrected by _Michel Marcus_ and _Robert Israel_, Jul 24 2015