The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A018845 Number of iterations required for the sum of n and its prime divisors = t to reach a prime (where t replaces n in each iteration) in A016837. 2
 4, 2, 3, 2, 1, 2, 2, 2, 1, 3, 1, 2, 1, 1, 3, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 3, 3, 2, 3, 5, 4, 1, 1, 1, 2, 2, 1, 2, 2, 10, 3, 2, 1, 6, 1, 3, 1, 5, 5, 1, 5, 3, 2, 1, 5, 1, 1, 2, 7, 3, 4, 4, 4, 1, 10, 3, 1, 4, 6, 3, 6, 3, 1, 6, 3, 4, 2, 2, 2, 2, 9, 2, 5, 1, 1, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,1 LINKS Robert Israel, Table of n, a(n) for n = 2..10000 FORMULA Factor n, add n and its prime divisors. Sum = t, t replaces n, repeat until a prime is produced in k iterations. For x in A050703, a(x) = 1. - Michel Marcus, Jul 24 2015 Number of iterations x->A075254(x) to reach a prime, starting at x=n. - R. J. Mathar, Jul 27 2015 EXAMPLE Starting with 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 in 3 iterations, so a(4)=3. MAPLE f:= proc(n) option remember; local t;    t:= n + convert(map(convert, ifactors(n)[2], `*`), `+`);    if isprime(t) then 1 else 1+procname(t) fi end proc: map(f, [\$2..100]); # Robert Israel, Jul 26 2015 MATHEMATICA a[n_] := a[n] = Module[{t, f = FactorInteger[n]}, t = n + f[[All, 1]]. f[[All, 2]]; If[PrimeQ[t], 1, 1 + a[t]]]; a /@ Range[2, 100] (* Jean-François Alcover, Jul 19 2020, after Maple *) PROG (PARI) sfpn(n) = {my(f = factor(n)); n + sum(k=1, #f~, f[k, 1]*f[k, 2]); } a(n) = {nb = 1; while (! isprime(t=sfpn(n)), n=t; nb++); nb; } CROSSREFS Cf. A016837, A050703, A075254. Sequence in context: A063447 A304786 A335381 * A333215 A028947 A068152 Adjacent sequences:  A018842 A018843 A018844 * A018846 A018847 A018848 KEYWORD easy,nonn AUTHOR EXTENSIONS Corrected by Michel Marcus, Jul 24 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 17 18:15 EDT 2021. Contains 343070 sequences. (Running on oeis4.)