TOPICS
Search

Sum of Prime Factors


SumofPrimeFactors

Let sopfr(n) be the sum of prime factors (with repetition) of a number n. For example, 20=2^2·5, so sopfr(20)=2+2+5=9. Then sopfr(n) for n=1, 2, ... is given by 0, 2, 3, 4, 5, 5, 7, 6, 6, 7, 11, 7, 13, 9, 8, ... (OEIS A001414). The sum of prime factors function is also known as the integer logarithm.

The high-water marks are 0, 2, 3, 4, 5, 7, 11, 13, 17, ..., which occur at positions 1, 2, 3, 4, 5, 7, 11, 13, 17, ... (OEIS A046022), which, with the exception of the first term, correspond exactly to the actual values of the high-water marks.

If sopfr(p) is considered to be 0 for p a prime, then the sequence of high-water marks is 0, 4, 5, 6, 7, 9, 10, 13, 15, 19, 21, 25, 31, 33, ... (OEIS A088685), which occur at positions 1, 4, 6, 8, 10, 14, 21, 22, 26, 34, 38, 46, 58, ... (OEIS A088686). Rather amazingly, if the first 7 terms are dropped, then the last digit of the high-water marks a and the last digit of their positions b fall into one of the four patterns (a,b)=(1,8), (3, 2), (5, 6), or (9, 4) (A. Jones, pers. comm., October 5, 2003).

Now consider iterating sopfr(n) until a fixed point (which will either be 0 or a prime) is reached. For example, 20 would give the sequence 20, 9, 6, 5, 5, .... The fixed points for n=1, 2, ... are then given by 0, 2, 3, 4, 5, 5, 7, 5, 5, 7, 11, 7, 13, ... (OEIS A029908), and the lengths of the corresponding sequences are 2, 1, 1, 1, 1, 2, 1, 3, 3, 2, 1, 2, 1, 4, ... (OEIS A002217).

Now consider the restricted sums of the iteration lists after discarding the initial term. For example, 20 would give 9+6+5=20. Then the only numbers less than 10^6 that are equal to the sums of their restricted iteration lists are 20, 38, and 74.

The similar function sopf(n) giving the sum of distinct prime factors of n can also be considered. For n=1, 2, ..., this function has the values 0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, ... (OEIS A008472).


See also

Prime Factor, Prime Sums

Explore with Wolfram|Alpha

References

Sloane, N. J. A. Sequences A001414/M0461, A002217/M0150, A008472, A029908, A046022, A088685, and A088686 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Sum of Prime Factors

Cite this as:

Weisstein, Eric W. "Sum of Prime Factors." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SumofPrimeFactors.html

Subject classifications