There's a problem to calculate $\sum^{n}_{i=1}\sum^{m}_{j=1}\frac{|i-j|}{\gcd(i,j)}$, whose tutorial gives the following transformation I really don't understand. $$\sum^{n}_{i=1}\sum^{m}_{j=1}\frac{|i-j|}{\gcd(i,j)} \\ =\sum^{n}_{i=1}\sum^{m}_{j=1}\sum_{d}\frac{|i-j|}{\gcd(i,j)}[\gcd(i,j)=d] \\ =\sum_{d}\sum^{\lfloor\frac{n}{d}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{d}\rfloor}_{j=1}|i-j|[\gcd(i,j)=1] \\ =\sum_{d}\sum^{\lfloor\frac{n}{d}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{d}\rfloor}_{j=1}|i-j|\sum_{d'|\gcd(i,j)}\mu(d') \\ =\sum_{d}\sum_{d'}d'\mu(d')\sum^{\lfloor\frac{n}{dd'}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{dd'}\rfloor}_{j=1}|i-j| \\ =\sum_{d}\sum_{d'|d}d'\mu(d')\sum^{\lfloor\frac{n}{d}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{d}\rfloor}_{j=1}|i-j|$$ Please show me a bit more detail about last two steps. Thanks a lot!
2026-03-26 19:06:43.1774552003
An expression with gcd and abs is transformed magically!
66 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in SUMMATION
- Computing:$\sum_{n=0}^\infty\frac{3^n}{n!(n+3)}$
- Prove that $1+{1\over 1+{1\over 1+{1\over 1+{1\over 1+...}}}}=\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+...}}}}$
- Fourier series. Find the sum $\sum_{n=1}^\infty \frac{(-1)^{n+1}}{2n+1}$
- Sigma (sum) Problem
- How to prove the inequality $\frac{1}{n}+\frac{1}{n+1}+\cdots+\frac{1}{2n-1}\geq \log (2)$?
- Double-exponential sum (maybe it telescopes?)
- Simplify $\prod_{k=1}^{l} \sum_{r=d}^m {{m}\choose{r}} \left(N-k \right)^{r} k^{m-r+1}$
- Sum of two martingales
- How can we prove that $e^{-jωn}$ converges at $0$ while n -> infinity?
- Interesting inequalities
Related Questions in DIVISIBILITY
- Reciprocal-totient function, in term of the totient function?
- Can we find integers $x$ and $y$ such that $f,g,h$ are strictely positive integers
- Positive Integer values of a fraction
- Reciprocal divisibility of equally valued polynomials over a field
- Which sets of base 10 digits have the property that, for every $n$, there is a $n$-digit number made up of these digits that is divisible by $5^n$?
- For which natural numbers are $\phi(n)=2$?
- Interesting property about finite products of $111..1$'s
- Turn polynomial into another form by using synthetic division
- Fractions of the form $\frac{a}{k}\cdot\frac{b}{k}\cdot\frac{c}{k}\cdots=\frac{n}{k}$
- Proof: If $7\mid 4a$, then $7\mid a$
Related Questions in TRANSFORMATION
- $\int \ x\sqrt{1-x^2}\,dx$, by the substitution $x= \cos t$
- Functions on $\mathbb{R}^n$ commuting with orthogonal transformations
- How do you prove that an image preserving barycentric coordinates w.r.t two triangles is an affine transformation?
- Non-logarithmic bijective function from $\mathbb{R}^+$ into $\mathbb{R}$
- Where does this "magical" transformatiom come from?
- Calculate the convolution: $\frac{\sin(4t)}{\pi t}*( \cos(t)+\cos(6t) )$ using Fourier transform
- Find all $x \in\mathbb R^4$ that are mapped into the zero vector by the transformation $x \mapsto Ax$
- Linear transformation $f (ax+by)=$?
- Is a conformal transformation also a general coordinate transformation?
- Infinite dimensional analysis
Related Questions in ABSOLUTE-VALUE
- To find the Modulus of a complex number
- What does $|a| = |b|$ is equal to?
- Symmetric polynomial written in elementary polynomials
- If $|ax^2+bx+c|\le \frac12$ for all $|x|\le1$, then $|ax^2+bx+c|\le x^2-\frac12$ for all $|x|\ge1$
- Proving that a double integral converges
- Equation system
- If $\sqrt{9−8\cos 40^{\circ}} = a +b\sec 40^{\circ}$, then what is $|a+b|$?
- Proving that inequalities $\|a\|_{\infty} \leq \|a\|_2 \leq \sqrt{n} \|a\|_{\infty}$ are true and sharp.
- Find a number $M$, such that $|x^3-4x^2+x+1| < M$ for all $1<x<3$
- Absolute Value of a Complex Number Inequality
Related Questions in MOBIUS-FUNCTION
- A question about Mertens function $M(n)=\sum_{k=1}^n\mu(n)$
- A good estimation of the inverse $f^{-1}(x)$ of $-\sum_{n=2}^\infty\frac{\mu(n)}{n}x^n$, over the unit inverval if it has mathematical meaning
- Find a continuous function, over the unit interval, satisfying $\int_0^x f(u)du\geq \sum_{n=1}^\infty\frac{\mu(n)}{n^2}x^{n-1}$ for each $ x\in[0,1]$
- A rigorous proof of $\Re\int_0^{2\pi}\left(\sum_{n=1}^{\infty}\frac{\mu(n)}{n}\log\left(\frac{1}{1-ne^{i\theta}}\right)\right)d\theta=2\pi$
- An inequality deduced for $-\sum_{n=1}^\infty\frac{\mu(n)}{n}x^{n-1}$ on assumption of convexity, invoking a theorem due to Dragomir
- Why $\sum\frac{\mu(h)\mu(k)}{hk}\gcd(h,k)=\prod\limits_{p\le x}\left(1-\frac1p\right)$, where the sum enumerates the pairs $(h,k)$ of primes below $x$
- Two questions concerning series involving the Möbius function and trigonometric functions
- Where is positive or negative the function $\sum_{n=1}^\infty\frac{\mu(n)}{n}\left(\frac{\cos(nx)}{n}\right)^2$ over the set $[0,2\pi]$?
- Prove $ \left\vert \sum_{n=1}^N \frac{\mu(n)}{n} \right\vert \leqslant 1,$ where $\mu(n)$ is the Mobius function.
- Justify an approximation of $-\sum_{n=2}^\infty H_n\left(\frac{1}{\zeta(n)}-1\right)$, where $H_n$ denotes the $n$th harmonic number
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
$$\sum^{n}_{i=1}\sum^{m}_{j=1}\frac{|i-j|}{\gcd(i,j)} \\ \overset{(1)}=\sum^{n}_{i=1}\sum^{m}_{j=1}\sum_{d}\frac{|i-j|}{\gcd(i,j)}[\gcd(i,j)=d] \\ \overset{(2)}=\sum_{d}\sum^{\lfloor\frac{n}{d}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{d}\rfloor}_{j=1}|i-j|[\gcd(i,j)=1] \\ \overset{(3)}=\sum_{d}\sum^{\lfloor\frac{n}{d}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{d}\rfloor}_{j=1}|i-j|\sum_{d'|\gcd(i,j)}\mu(d') \\ \overset{(4)}=\sum_{d}\sum_{d'}d'\mu(d')\sum^{\lfloor\frac{n}{dd'}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{dd'}\rfloor}_{j=1}|i-j| \\ \overset{(5)}=\sum_{d}\sum_{d'|d}d'\mu(d')\sum^{\lfloor\frac{n}{d}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{d}\rfloor}_{j=1}|i-j|$$
I suppose that by the last two steps you mean equalities (4) and (5).
In (4) we want to change order of summation. We have that $d'$ divides both $i$ and $j$. This means that $i=kd'$ and $j=ld'$ for some $l$ and $k$. To get $1\le id \le n$ we need to have $1\le kd'd\le n$, meaning that $k$ is between $1$ and $\lfloor \frac n{d'd}\rfloor$. Similarly we can get bounds for $l$.
After this transformation we have $|i-j|=|kd'-ld'|=d'|k-l|$.
From this we get $$\sum_{d}\sum^{\lfloor\frac{n}{d}\rfloor}_{i=1}\sum^{\lfloor\frac{m}{d}\rfloor}_{j=1}|i-j|\sum_{d'|\gcd(i,j)}\mu(d') =\\ \sum_{d}\sum^{\lfloor\frac{n}{dd'}\rfloor}_{k=1}\sum^{\lfloor\frac{m}{dd'}\rfloor}_{l=1}d'|k-l|\sum_{d'}\mu(d') = \\ \sum_{d} \sum_{d'}d'\mu(d') \sum^{\lfloor\frac{n}{dd'}\rfloor}_{k=1}\sum^{\lfloor\frac{m}{dd'}\rfloor}_{l=1}|k-l|$$
This is the same as in your post, the only difference is that variables are denoted by $i$ and $j$ instead of $k$ and $l$.
In the equation (5) we simply denote $d'd$ as the new $d$. This means that after this change $d$ must be multiple of $d'$, so we sum only over the pairs where $d'\mid d$. (If it helps to make it clearer, you can choose a new variable name to denote this expression, for example $d''=dd'$. It is clear that $d\mid d''$ and, conversely, every multiple of $d'$ is of this form.)