Sum of Prime Factors

DOWNLOAD Mathematica Notebook 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).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.