# $\gcd(b^x - 1, b^y - 1, b^ z- 1,…) = b^{\gcd(x, y, z,…)} -1$ [duplicate]

Possible Duplicate:
Number theory proving question?

Dear friends,

Since $b$, $x$, $y$, $z$, $\ldots$ are integers greater than 1, how can we prove that $$\gcd (b ^ x - 1, b ^ y - 1, b ^ z - 1 ,\ldots)= b ^ {\gcd (x, y, z, .. .)} - 1$$ ?

Thank you!

Paulo Argolo

-
– Timothy Wagner Nov 23 '10 at 20:09

1
@Timothy: ah, you're right. I should've checked for duplicates. – Qiaochu Yuan Nov 23 '10 at 20:20

## marked as duplicate by Qiaochu Yuan, Aryabhata, Robin Chapman, KennyTMNov 25 '10 at 20:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 2 Answers

It suffices to prove it for two terms, that is, $\gcd(a^n - 1, a^m - 1) = a^{\gcd(n,m)} - 1$. The basic idea is that we can use the Euclidean algorithm on the exponents, as follows: if $n > m$, then

$$\gcd(a^n - 1, a^m - 1) = \gcd(a^n - 1, a^n - a^{n-m}) = \gcd(a^{n-m} - 1, a^m - 1).$$

So we can keep subtracting one exponent from the other until we get $\gcd(n, m)$ as desired. Another way to look at this computation is to write $d = \gcd(a^n - 1, a^m - 1)$ and note that

$$a^n \equiv 1 \bmod d, a^m \equiv 1 \bmod d \Rightarrow a^{nx+my} \equiv 1 \bmod d$$

from which it readily follows, as before, that $a^{\gcd(n,m)} \equiv 1 \bmod d$, so $d$ dividess $a^{\gcd(n,m)} - 1$. On the other hand, $a^{\gcd(n, m)} - 1$ also divides $d$.

What's really nice about this result is that it holds both for particular values of $a$ and also for $a$ as a variable, e.g. in a polynomial ring with indeterminate $a$.

You can readily deduce several seemingly nontrivial results from this; for example, the sequence defined by $a_0 = 2, a_n = 2^{a_{n-1}} - 1$ is a sequence of pairwise relatively prime integers, from which it follows that there are infinitely many primes. By working only slightly harder you can deduce that in fact there are infinitely many primes congruent to $1 \bmod p$ for any prime $p$.

-

Hint $\$ The simple equivalences demonstrated below prove that both sides of your equation have the same common divisors $\rm\:d\:,\:$ therefore they have the same greatest common divisor. $\ \$ QED

$$\begin{eqnarray}\rm\ \ mod\,\ d\!:\ \ b^M,\:b^N\equiv 1&\iff&\rm ord(b)\ |\ M,N\iff ord(b)\ |\ (M,N)\iff b^{\,(M,N)}\equiv 1\\ \rm i.e.\ \ \ d\ |\ b^M\!-\!1,\:b^N\!-\!1\ &\iff&\rm\ d\ |\ b^{\,(M,N)}\!-\!1,\qquad\ \ \, where \rm\quad (M,N)\, :=\, gcd(M,N) \end{eqnarray}$$

Note $\$ The conceptual structure at the heart of this simple proof is the ubiquitous order ideal. $\$ See my post here for more on this and the more familiar additive form of a denominator ideal.

More generally $\rm\ gcd(f(m), f(n))\ =\ f(gcd(m,n))\ \ \ if\ \ \ f(n)\ \equiv\ f(n\!-\!m)\ \ (mod\ f(m)),\:$ and $\rm\: f(0)\ =\ 0.\$ See my post here for a simple inductive proof.

In fact there is a q-analog: the result also holds true for polynomials $\rm\ \ f(n)\, =\, (x^n\!-\!1)/(x\!-\!1),\$ and $\rm\ x\to 1\$ yields the integer case (Bezout identity) - see my post here for a simple proof.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 30, "mathjax_display_tex": 4, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9356833696365356, "perplexity_flag": "head"}