This question assumes the following definitions where $p$ is a prime and $n$ and $k$ are positive integers.
(1) $\quad\pi(x)=\sum\limits_{p\le x} 1\quad\text{(fundamental prime counting function)}$
(2) $\quad\Pi(x)=\sum\limits_{p^k\le x} \frac{1}{k}\quad\text{(Riemann's prime-power counting function)}$
(3) $\quad f(x)=\sum\limits_{p^k\le x}p^{1-k}=\sum\limits_{n\le x}\left\{ \begin{array}{cc} \frac{\text{rad}(n)}{n} & n=p^k \\ 0 & n\ne p^k \\ \end{array} \right.\quad\text{(another prime-power counting function)}$
(4) $\quad H(x)=\sum\limits_{n\le x}\frac{1}{n}\quad\text{(harmonic number function)}$
(5) $\quad A137851(n)=\sum\limits_{p|n} p\ \mu\left(\frac{n}{p}\right)\quad$ (see OEIS entry A137851)
(6) $\quad sopf(n)=\sum\limits_{p|n} p\qquad\qquad$ (see OEIS entry A008472)
Note the prime-power counting function $f(x)$ defined in formula (3) above has the characteristic $\pi(x)\le f(x)\le \Pi(x)$ for $x\ge 0$ and the characteristic $\pi(x)<f(x)<\Pi(x)$ for $x\ge 8$.
Question: Can the following conjectured relationships between $\pi(x)$ and $f(x)$ defined in formulas (1) and (3) above and the harmonic number function $H(x)$ defined in formula (4) above be proven?
(7) $\quad\pi(x)=\sum\limits_{n\le x}\frac{\text{A137851}(n)}{n}\,H\left(\frac{x}{n}\right)\qquad\text{(conjectured relatiohship)}$
(8) $\quad f(x)=-\sum\limits_{n\le x}\frac{\mu(n)\,sopf(n)}{n}\,H\left(\frac{x}{n}\right)\quad\text{(conjectured relatiohship)}$
I verified the conjectured relationships illustrated in (7) and (8) above for integer values of $x\le 10,000$.
$$\sum_{n\le x} a_n=\sum_{n\le x} b_n g(x/n), \qquad g(x)=\sum_{n\le x} c_n$$ iff $$a_n = \sum_{d| n} b_d c_{n/d}$$ Thus your last question becomes $$p^{1-k} 1_{n=p^k}=-\sum_{d| n} \frac{\mu(d)\sum_{p| d}p}{d} \frac{d}{n}$$
Changing the order of summation it is $$= -\frac1n\sum_{p| n} p \sum_{d| n/p} \mu(dp)$$
$n=p^r m,p\nmid m$. Then $\sum_{d| n/p} \mu(dp)=\sum_{d| m} \mu(dp)=-\sum_{d| m} \mu(d)=-1_{m=1}$. Thus it is $$=\frac1n\sum_{p| n} p 1_{n=p^k}= p^{1-k} 1_{n=p^k}$$