Consider this functions below.

$$f(n)=\sum\_{k=2}^{n}gpf(k)$$ $$g(n)=\prod\_{2}^{n}gpf(k)$$

where $gpf$ is the greatest prime factor function.(For example, $gpf(30)=5$)

Is it possible to find an asymptotic formula for $f(n)$ and $g(n)$ for larger $n$?

Or lets simplify the question. Assume $p\leq n$ is a prime number. For how many $m\leq n$, $gpf(m)=p$ is true?