Suppose I have an integer $N$ with prime decomposition $N=\prod_{i=1}^m p_i^{n_i}$. How can I write
$$\prod_{i=1}^m (p_i^{n_i}-1)$$
as a sum that only depends on $N$, and not it's prime decomposition?
Clearly we have
$$\prod_{i=1}^m (p_i^{n_i}-1) = N - \sum_{i=1}^{m} \frac{N}{p_i^{n_i}} + \sum_{\substack{i_1,i_2=1 \\ i_1\leq i_2}}^n \frac{N}{p_{i_1}^{n_{i_1}} p_{i_2}^{n_{i_2}}} \dots$$
So it seems like we could write this as something like
$$\prod_{i=1}^m (p_i^{n_i}-1) = \sum_{d|N}\mu(d)\frac{N}{f_{N}(d)}$$
where $f_N(d)$ is a function that looks something like
$$f_N(d) = \prod_{p_i|d_i} p_i^{n_i}$$
My questions is, is there already a function like $f_N(d)$ in the literature that will satisfy this? If not, is there some other way to write $\prod_{i=1}^m (p_i^{n_i}-1)$ as a sum that only depends on $N$?
Since the formula $$\prod_{i=1}^m (p_i^{n_i}-1) = n \prod_{i=1}^m \left(1-\frac1{p_i^{n_i}}\right)$$ resembles the totient function, I thought that this kind of generalization of totient function might have been studied somewhere. The book Sandor J., Crstici B. Handbook of number theory, vol.2, has a chapter on generalizations of totient function, so I tried to look there. I will copy the relevant part from this book below.
I read there that the product from your question is sometimes called unitary totient function and denoted $\varphi^*(n)$. There are also other arithmetical functions related to unitary divisors.
Also a paper by Eckford Cohen was mentioned as a reference. (Exact reference is given below.) In this paper we can find the following:
This sum over unitary divisors can be rewritten as $$\sum_{\substack{d\mid n\\(d,\frac nd)=1}} \mu^*(d) \frac nd$$ which seems to be exactly the sum from your post. (Notice that unitary divisors are precisely the divisors of the form $p_i^{n_i}$.)
This is the part of Section 3.7.6 from Sandor-Crstici relevant to the question. (You can find much more facts about unitary versions of various arithmetical functions as well as further references in this book.)