I've been learning some elementary number theory purely out of interest since I don't have any number theory courses at Uni yet, I've come across the M$\ddot{o}$bius function $\mu(n)$ which takes on the values $(-1)^k$ if n is the product of k distinct primes, and 0 if n is not square free. One can quite easily show that: $$\mu^2(n) = \sum_{k|n^2}\mu(k)\qquad(1)$$ And, if you define the number of square free numbers less than or equal to N is the 'summatory function' $$Q(x) = \sum_{d \leq N}\mu^2(d)$$ And then by (1), we have $$Q(x) = \sum_{d \leq N}\mu^2(d) = \sum_{d \leq N}\sum_{k|n^2}\mu(k)$$
This is where I get stuck. I'm trying to change the order of summation, I know how to change it when there are bound to infinity, or even just finite bounds from one integer to another, but I'm unfamiliar with number theory and don't know how to deal with the summation. I've seen an example as in Simple Divisor Sum Transformation by Changing the Order of Double Summation, but I just don't know how to do it for this example.
I've done my research, and figured out there may be some kind of inclusion/exclusion argument involved, but I'm not sure I can make sense of it. Is there a general strategy one can employ here in order to change the bounds? I've also read sum squared möbius function which kind of gives me the answer I'm looking for but I just don't understand how they got there.
Any help / pointing in the right direction would be much appreciated.
Thanks