4
$\begingroup$

I've seen this fact stated (or alluded to) in various places, but never proved:

Let $n$ be a positive integer, let $m \in \{1,2,...,n-1\}$. Then $$\gcd(2^n-1, 2^m+1) = \begin{cases} 1 & \text{if $n/\gcd(m,n)$ is odd} \\ 2^{\gcd(m,n)}+1 & \text{if $n/\gcd(m,n)$ is even} \end{cases}$$

I've written up my own proof (see below), but I'm hoping to collect a few more. Any takers?

Also, information regarding generalizations would be very welcome!

$\endgroup$
  • $\begingroup$ Do you have your own proof? $\endgroup$ – Lubin Sep 13 '15 at 3:09
  • $\begingroup$ @Lubin Yes but it is long-ish. I'll post it tomorrow; it's bedtime for me now :) $\endgroup$ – 727 Sep 13 '15 at 5:01
  • $\begingroup$ @Lubin I've added my proof, which I have condensed from my previous write-up. Hopefully it's still clear enough for everyone. $\endgroup$ – 727 Sep 13 '15 at 21:02
  • $\begingroup$ I would like to collect some more proofs of this yet, if anyone would care to proffer some. In particular, I'd be interested in arguments that make use of manipulations in base $2$. $\endgroup$ – 727 Sep 13 '15 at 21:04
  • 1
    $\begingroup$ One more question: seems to me that the result might remain true when you replace “$2$” with any integral base bigger than $1$. $\endgroup$ – Lubin Sep 14 '15 at 0:52
1
$\begingroup$

Since $2^{2m}-1 = (2^m-1)(2^m+1)$, we have that

\begin{equation} \gcd(2^n-1,2^m+1) {\large\mid} \gcd(2^n-1,2^{2m}-1) = 2^{\gcd(2m,n)}-1 \end{equation}

(Some proofs of the equality can be found here, among other places.)

Case 1

If $n/\gcd(m,n)$ is odd, then $\gcd(2m,n) = \gcd(m,n)$, and so $\gcd(2^n-1,2^m+1)$ divides $2^{\gcd(m,n)}-1$, which in turn divides $2^m-1$. As $\gcd(2^m-1,2^m+1) = 1$, we conclude that $\gcd(2^n-1,2^m+1) = 1$.

Case 2

On the other hand, if $n/\gcd(n,m)$ is even, then $\gcd(2m,n) = 2\gcd(m,n)$, which implies that $\gcd(2^n-1,2^m+1)$ divides $2^{2\gcd(m,n)}-1 = (2^{\gcd(m,n)}-1)(2^{\gcd(m,n)}+1)$. As $\gcd(2^m+1, 2^{\gcd(m,n)}-1) = 1$, it must be that $\gcd(2^m+1,2^n-1)$ divides $2^{\gcd(m,n)}+1$. Now observe that $2^{\gcd(m,n)}+1$ divides both $i)$ $2^n-1$ and $ii)$ $2^m+1$.

Observation $i)$ follows from the fact that $2^{\gcd(m,n)}+1$ divides $(2^{\gcd(m,n)}+1)(2^{\gcd(m,n)}-1)=2^{2\gcd(m,n)}-1=2^{\gcd(2m,n)}-1$, which in turn divides $2^n-1$. Observation $ii)$ follows from the fact that $(2^{\gcd(m,n)}+1)(2^{\gcd(m,n)}-1)=2^{2\gcd(m,n)}-1=2^{\gcd(2m,n)}-1$ divides $2^{2m}-1 = (2^m+1)(2^m-1)$, which in turn implies that $2^{\gcd(m,n)}+1$ divides $2^m+1$.

We therefore conclude that $\gcd(2^n-1,2^m+1) = 2^{\gcd(m,n)}+1$.

$\endgroup$
  • 1
    $\begingroup$ I just realized that this proof easily extends to the case where we do not assume that $m<n$. If we take $\gcd(2m,n) = \gcd(m,n)$ and $\gcd(2m,n) = 2\gcd(m,n)$ as our conditions (rather than $n/\gcd(m,n)$ being odd or even, respectively), then both the result and the proof still hold. $\endgroup$ – 727 Sep 13 '15 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.