# Limit for entropy of prime powers defined by multiplicative arithmetic function

This question is related to my other question ( Entropy of a natural number ).
Let $f \ge 0$ be a multiplicative arithmetic function and $F(n) = \sum_{d|n}f(d)$.
Define the entropy of $n$ with respect to $f$ to be

$H_f(n) = -\sum_{d|n} \frac{f(d)}{F(n)}\log(\frac{f(d)}{F(n)}) = \log(F(n)) – \frac{1}{F(n)}\sum_{d|n} f(d)\log(f(d))$

For instance in the last question we had $f=id$.
Then I can prove that $H_f(mn) = H_f(m)+H_f(n)$ if $\gcd(m,n)=1$, hence $H_f$ is an additive function.

Is it true that $\lim_{\alpha \rightarrow \infty} H_f(p^\alpha)$ always exists, where $p$ is a prime?
In the last question we had $\lim_{\alpha \rightarrow \infty} H_{id}(p^\alpha) = \frac{p \log(p)}{p-1}-\log(p-1)$

If $f=\phi$ is the Euler totient function, then I can prove, that
$\lim_{\alpha \rightarrow \infty} H_{\phi}(p^\alpha) = \frac{ \log(p)}{p-1}+\log(\frac{p}{p-1})$

Edit:
I found a counterexample: $f\equiv 1$,$F(n) = \tau(n)$, where $\tau$ counts the divisors of $n$, then $H_f(n)=\log(\tau(n))$ and $H_f(p^\alpha)=\log(\alpha+1)$ is unbounded.

Hence the question might be phrased like this:

What properties must $f$ have such that the above limit exists?

Edit Why is $H_f$ additive?:

First $H_f(n) = \log(F(n)) – \frac{1}{F(n)} \sum_{d|n} f(d) \log(f(d))$
Denote by $E_f(n) = \sum_{d|n} f(d) \log(f(d))$
Then using the multiplicativity of $f$ one can show that $E_f(mn) = F(m)E_f(n)+F(n)E_f(m)$ when $\gcd(m,n)=1$.
Using this one can show that $H_f$ is additive.

If you have a counterexample $f$ and $m,n$ where this is not true, please post it.

#### Solutions Collecting From Web of "Limit for entropy of prime powers defined by multiplicative arithmetic function"

If $f(n)$ is multiplicative and non-zero then let $F(n) = \sum_{d | n} f(d)$ and

$$h(n) = \frac{\sum_{d | n} f(d) \log f(d)}{F(n)}$$
If $gcd(n,m)=1$ then

$h(n)+h(m)$ $= \frac{F(m)\sum_{d | n} f(d) \log f(d)+F(n)\sum_{d | m} f(d) \log f(d)}{F(n)F(m)}$ $=\frac{\sum_{d ‘ | m,d | n} f(dd’) \log f(dd’)}{F(nm)}=h(nm)$

Thus $$h(n) = \sum_{p^k \| n} h(p^k)=\sum_{p^k \| n}\frac{\sum_{m=0}^k f(p^m)\log f(p^m)}{\sum_{l=0}^k f(p^l)}$$
Now $\log F(n)$ is additive too, as well as
$$H_f(n) = \log F(n)-h(n) = \sum_{p^k \| n} =\sum_{p^k \| n}\sum_{m=0}^k \log f(p^m) \left(1-\frac{(f(p^m) }{\sum_{l=0}^k f(p^l)}\right)$$

If $f(n) \ge 1$ then $H_f(n)$ small implies that
$$\sum_{m=0}^k \left(1-\frac{(f(p^m) }{\sum_{l=0}^k f(p^l)}\right)=\frac{k}{\sum_{l=0}^k f(p^l)}-1$$
is small. It happens for example when $f(n) = \phi(n)$.