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!)
 A029908 Starting with n, repeatedly sum prime factors (with multiplicity) until reaching 0 or a fixed point. 13
 0, 2, 3, 4, 5, 5, 7, 5, 5, 7, 11, 7, 13, 5, 5, 5, 17, 5, 19, 5, 7, 13, 23, 5, 7, 5, 5, 11, 29, 7, 31, 7, 5, 19, 7, 7, 37, 7, 5, 11, 41, 7, 43, 5, 11, 7, 47, 11, 5, 7, 5, 17, 53, 11, 5, 13, 13, 31, 59, 7, 61, 5, 13, 7, 5, 5, 67, 7, 5, 5, 71, 7, 73, 5, 13, 23, 5, 5, 79, 13, 7, 43, 83, 5, 13 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS That is, the sopfr function (see A001414) applied repeatedly until reaching 0 or a fixed point. For n>1 the sequence reaches a fixed point which is either 4 or a prime. A002217(n) is number of terms in sequence from n to a(n). - Reinhard Zumkeller, Apr 08 2003 Because sopfr(n) <= n (with equality at 4 and the primes), the first appearance of all primes is in the natural order: 2,3,5,7,11,... . [Zak Seidov, Mar 14 2011] The terms 0, 2, 3 and 4 occur exactly once, because no number > 5 can have factors that sum to be < 5, and therefore can never enter a trajectory that will drop below 5. [Christian N. K. Anderson, May 19 2013] LINKS T. D. Noe and Christian N. K. Anderson, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe) Eric Weisstein's World of Mathematics, Sum of Prime Factors EXAMPLE 20 -> 2+2+5 = 9 -> 3+3 = 6 -> 2+3 = 5, so a(20)=5. MAPLE f:= proc(n) option remember; if isprime(n) then n else `procname`(add(x*x, x = ifactors(n))) fi end proc: f(1):= 0: f(4):= 4: map(f, [\$1..100]); # Robert Israel, Apr 27 2015 MATHEMATICA ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] slog[x_] := slog[x_] := Apply[Plus, ba[x]*ep[x]] Table[FixedPoint[slog, w], {w, 1, 128}] f[n_] := Plus @@ Flatten[ Table[ #[], {#[]}] & /@ FactorInteger@n]; Array[ FixedPoint[f, # ] &, 87] (* Robert G. Wilson v, Jan 18 2006 *) fz[n_]:=Plus@@(#[]*#[]&/@FactorInteger@n); Array[FixedPoint[fz, #]&, 1000] (* Zak Seidov, Mar 14 2011 *) CROSSREFS Cf. A001414 (sum of prime factors of n). Cf. A081758, A002217, A075860. Cf. A001414, A056239, A008475, A082081, A082083. Sequence in context: A289311 A345303 A345310 * A081758 A106492 A338038 Adjacent sequences:  A029905 A029906 A029907 * A029909 A029910 A029911 KEYWORD nonn AUTHOR 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 October 23 14:15 EDT 2021. Contains 348214 sequences. (Running on oeis4.)