# Seeking explanation for a curious reciprocity-like identity.

I just stumbled, by pure accident, on this: $$\gcd \left(\frac{(m+1)^n-1}{m},m\right)=\gcd \left(\frac{(n+1)^m-1}{n},n\right)$$ It probably has a straightforward proof but more than a proof I want a conceptual background for it. Is it related to any known reciprocity laws or something?

• No. The first number simply equals $\gcd (n,m)$ and the second is $\gcd (m,n)$. To show this, use just one step of the Euclidean algorithm for the $\gcd$. – Crostul May 3 '17 at 5:51

Note that $$(m+1)^n=1+nm+\frac{n(n-1)}2m^2+\ldots$$ where everything hidden in the dots is also a multiple of $$m^2$$. Hence $$\frac{(m+1)^n-1}{m}$$ is just $$n$$ plus a multiple o $$m$$, which can be ignored when taking the $$\gcd$$ with $$m$$. In other words, the left hand side is just$$\gcd(n,m)$$ (and the right hand side $$\gcd(m,n)$$).