This question assumes the following definitions where $M(x)$ is the Mertens function and $f(x)$ is the perfect number counting function. See here for more information on the Wolfram Language PerfectNumberQ[n] function referenced below.
(1) $\quad M(x)=\sum\limits_{n\le x}\mu(n)$
(2) $\quad f(x)=\sum\limits_{n\le x}a(n)\,,\qquad a(n)= \begin{array}{cc} \{ & \begin{array}{cc} 1 & \text{PerfectNumberQ}[n] \\ 0 & \text{True} \\ \end{array} \\ \end{array}$
I've verified the following relationship for the first 1,000,000 positive integer values of $x$. See https://oeis.org/A080225 for more information on the $b(n)$ coefficient function referenced and defined below.
(3) $\quad f(x)=\sum\limits_{n\le x}b(n)\,M(\frac{x}{n})\,,\qquad b(n)=\sum\limits_{d|n}a(d)$
Question: Can the relationship illustrated in (3) above be proved (or disproved)?
See the following links for more information on perfect numbers.
This is really the basics of Dirichlet convolution.
$$b(n) = \sum_{d | n} a(d), \qquad \sum_{d | n} \mu(n/d)b(d) = a(n)$$ $$f(x) =\sum_{n \le x} a(n) = \sum_{n \le x} \sum_{d | n} \mu(n/d)b(d)= \sum_{n \le x} \sum_{dm = n}b(d) \mu(m)\\= \sum_{dm\le x} b(d) \mu(m)= \sum_{d \le x} b(d) \sum_{m\le x/d} \mu(m) $$