I was looking at this post and I am trying to reverse-engineer integrals that will have the $\gcd$ function in the solution. However, I am struggling to understand where the $\gcd$ actually comes from. The only thing I could find online that helped was this from Wolfram alpha. I can see it probably involves the Kronecker Delta function which I am now trying to learn. It's hard because it seems like it requires contour integration which is not something I have learned yet. I do know Feynman Integration which might allow me to avoid some of it but it is fine if it doesn't.
Does anyone have a relatively simple example that they could go through to help me understand how this works?