Modified sum of prime factors function

404 Views Asked by At

Let $sopfr(n)$ be the sum of be the sum of prime factors (with repetition) of a number $n$. For example $sopfr(20)=2 + 2 + 5 = 9$ $^{(1.)}$

Then define:

$m(n) = \min\limits_{k\ge n} sopfr(k)$.

I am interested in a explicit formula for $m(n)$.


The motivation for this is - what is the "perimeter" of the smallest $n$-dimensional (i.e. minimal sum of columns, rows etc.) table of elements that can fit $N$ elements?

If $N$ is a nice number (say $10$), we can divide it into its divisors ($10=2*5$). Since $ab \ge a+b$ it follows that the smallest sum is of the numbers prime factors. Yet when dealing with a number like $17$, its better to substitute it for $18=2*3*3$ that is the best number by inspection. So $17$ can be best fitted into a "box" with dimensions $2,3,3$ i.e. $m(17)=2+3+3=8$

Obviously, it should be that the lower bound for $sopfr(n)$ should produce something close. The lower bound of $sopfr(n)$ is $3\log_{3} n$ $^{(2.)}$

Yet $m(n) - \lceil3\log_{3} n\rceil$ attains many, many zeroes and in general fits very well, except for odd strings of $1$ in between seas of zeroes.

Defining in Mathematica the following:

sopfr[n_] := Plus @@ Times @@@ FactorInteger@n; sopfr[1] = 0;

m[n_] := Min[Table[sopfr[i], {i, n, 3^(Ceiling[Log[3, n]])}]]

p[x_] := Ceiling[3*Log[3, x]]; Table[m[x] - p[x], {x, 1, 5000}]

we get in the first $5000$ differences that there are a total of $925$ ones. The upper counting limit on $m(n)$ is from the fact that the minimum will be obtained quicker then the nearest greater power of $3$, (EDIT: by Matthews answer and inspection)

Any help would be appreciated.

Edit1: Counting up till $10000$ we get $2055$ ones, so the accuracy is decreasing from $0.185$ to $0.2055$ (ratio of ones to all)


1 Sum of Prime Factors

2 result by Rafael Jakimczuk , from here is the source and also definition of sopfr[n_] by Ray Chandler

1

There are 1 best solutions below

2
On BEST ANSWER

You can show that $$ m(n) = \text{min} \left\{ 2t + 3 \left\lceil \frac{\log(\frac{n}{2^t})}{\log 3} \right\rceil | t=0, 1, 2 \right\}. $$ by showing that the value of $k\ge n$ that minimizes the sum of prime factors has the form $k=3^w$, $k=2\cdot 3^w$ or $k=2^2\cdot 3^w$.

This function is sequence A007600 at the OEIS.