How to Prove GCD of Two Powers of 2 Minus 1?

  • Thread starter CantorSet
  • Start date
  • Tags
    Gcd
In summary, this puzzle involves proving a property of GCD using double induction and divisibility properties of numbers.
  • #1
CantorSet
44
0
Hi everyone, this is not a homework question just a math puzzle I came across.

Let [itex]a[/itex] and [itex]b[/itex] be any two natural numbers. And let [itex] (m,n) [/itex] denote the GCD of [itex]m[/itex] and [itex]n[/itex] as usual. Prove [tex] (2^{a}-1,2^{b}-1) = 2^{(a,b)}-1 [/tex]

I'm thinking of double induction on [itex]a[/itex] and [itex]b[/itex] but I'm having trouble with the inductive steps.

Does any know how to do this? If so, any hints?
 
Physics news on Phys.org
  • #2
Hint: Write

[tex]2^n-1=2^{n-1}+2^{n+2}+...+2+1[/tex]
 
  • #3
I'd try to base a proof on the fact that [itex]2^m-1[/itex] divides [itex]2^n-1[/itex] whenever [itex]m[/itex] divides [itex]n[/itex]. This is very visually seen if you multiply 100010001 by 1111, for example. So, divisibility properties of numbers of the form [itex]2^n-1[/itex] map nicely to divisibility properties of the exponents.

By the way, this is true for repunits in general: the same goes, say, for numbers of the form [itex]\frac {10^n-1} 9[/itex] (i.e. numbers like 111111 in base 10).
 
  • #4
Thanks for the responses guys, those seem like really helpful hints. But I still could not proceed with the proof. =(
 
  • #5
Let me do an example. I claim that [itex]2^5-1[/itex] divides [itex]2^{10}-1[/itex]. I write

[tex]2^{10}-1=2^9+2^8+2^7+2^6+2^5+2^4+2^3+2^2+2^1+2^0[/tex]

and

[tex]2^5-1=2^4+2^3+2^2+2^1+2^0[/tex]

Then

[tex](2^{10}-1)-(2^5-1)=2^9+2^8+2^7+2^6+2^5[/tex]

Thus

[tex](2^{10}-1)-(2^5-1)-2^4(2^5-1)=0[/tex]

Hence

[tex]2^{10}-1=(2^5-1)(1+2^4)[/tex]

Can you do something similar in the general case?
 
  • #6
Another hint (again, of a visual nature - you are most encouraged to fill in the formal argument as micromass suggests) may be the following:

If you remember the Euclidean algorithm, it was based on the fact that GCD(a,b) = GCD(b, a mod b). Now, what is "a mod b" when both a and b are repunits? See one example: 11111111111111 (that's 14 ones) = 10001000100 x 1111 + 11.
 
  • #7
micromass said:
Thus

[tex](2^{10}-1)-(2^5-1)-2^4(2^5-1)=0[/tex]

Hm, my calculator doesn't agree. But

[tex](2^{10}-1)-(2^5-1)-2^5(2^5-1)=0[/tex]

should work.

Not that I understand anything, just playing with numbers.
 
  • #8
Oops, of course, Borek. I'm bad at arithmatic :frown:
 
  • #9
Use the euclidean algorithm:

Assume a > b, and write a = qb+r. Then (a,b) = (r,b), and

(2^a-1,2^b-1) = (2^a-1-2^(a-bq)(2^b-1),2^b-1) = (2^r-1,2^b-1). Now we know that b > r, and we do the anologous thing again (this is the euclidean algorithm) until we arrive at (2^a-1,2^b-1) = (2^(a,b)-1,2^s-1) for some s (or with the entries switched) with ((a,b),s) = (a,b). But now we know that (2^a-1,2^b-1) >= 2^(a,b)-1. Furthermore, 2^(a,b)-1 divides both 2^a-1 and 2^b-1 which can be shown by factorization, and we are done.

Another alternative is by induction on the largest exponent. If they are equal, the result is obvious, so we assume they are not equal. If it's a, we arrive at (2^a-1,2^b-1) = (2^r-1,2^b-1) where (a,b) = (r,b) and a > b > r. Now b is the largest exponent, so by induction (2^a-1,2^b-1) = (2^r-1,2^b-1) = 2^(r,b)-1 = 2^(a,b)-1 and we are done. If b was the largest one, a similar argument proves the inductive step. It remains to show the base case: a = b = 1, but this is trivial of course.
 
Last edited:
  • #10
disregardthat said:
Use the euclidean algorithm:

Assume a > b, and write a = qb+r. Then (a,b) = (r,b), and

(2^a-1,2^b-1) = (2^a-1-2^(a-bq)(2^b-1),2^b-1) = (2^r-1,2^b-1). Now we know that b > r, and we do the anologous thing again (this is the euclidean algorithm) until we arrive at (2^a-1,2^b-1) = (2^(a,b)-1,2^s-1) for some s (or with the entries switched) with ((a,b),s) = (a,b). But now we know that (2^a-1,2^b-1) >= 2^(a,b)-1. Furthermore, 2^(a,b)-1 divides both 2^a-1 and 2^b-1 which can be shown by factorization, and we are done.

Another alternative is by induction on the largest exponent. If they are equal, the result is obvious, so we assume they are not equal. If it's a, we arrive at (2^a-1,2^b-1) = (2^r-1,2^b-1) where (a,b) = (r,b) and a > b > r. Now b is the largest exponent, so by induction (2^a-1,2^b-1) = (2^r-1,2^b-1) = 2^(r,b)-1 = 2^(a,b)-1 and we are done. If b was the largest one, a similar argument proves the inductive step. It remains to show the base case: a = b = 1, but this is trivial of course.

That's very interesting. But how do we justify the step

[tex] (2^{a}-1-(2^{r}-1)(2^{b}-1),2^{b}-1)=(2^{r}-1,2^{b}-1) [/tex]
 
  • #11
Got it.

Thanks to everyone who responded on this thread. I bow before true masters of numbers. :shy:
 
  • #12
Oh, a mistake on my part there. Forget the first part, and focus on the proof by induction, where we instead transform the gcd as such:

(2^a-1,2^b-1) = (2^a-1-2^(a-b)(2^b-1),2^b-1) = (2^(a-b)-1,2^b-1), where gcd(a,b) = gcd(a-b,b), and so the inductive step is proved (since the largest of a-b and b is less than a (if a > b)).
 
  • #13
Let d = GCD([itex]2^{n}-1,2^{m}-1)[/itex] (with m < n) and

Lemma1: d is odd

Lemma2: If d divides b and d divides a, then d divdides (b-a) (with a < b)



Since [itex](2^{n}-1) - (2^{m}-1)[/itex] = [itex]2^{n} - 2^{m}[/itex] , we have

d | [itex](2^{n}-1)[/itex] and d | [itex](2^{m}-1)[/itex] -> d | [itex](2^{n} - 2^{m})[/itex] (Lemma2); and with n = s+m:

d | [itex](2^{n} - 2^{m})[/itex] -> d | [itex]2^{m}*(2^{s} - 1)[/itex]; and from Lemma 1 it follows:

d | [itex](2^{s} - 1)[/itex]; etc

But the process on the exponents (n,m) -> (n-m.m) etc is purely Euclidean's algorithm for the GCD
 

FAQ: How to Prove GCD of Two Powers of 2 Minus 1?

What is the GCD of two powers of 2, minus 1?

The GCD (Greatest Common Divisor) of two powers of 2, minus 1, is a mathematical concept used to find the largest positive integer that divides both numbers without leaving a remainder. It is also known as the Highest Common Factor (HCF) or Greatest Common Factor (GCF).

How do you calculate the GCD of two powers of 2, minus 1?

To calculate the GCD of two powers of 2, minus 1, you can use the Euclidean algorithm. This involves repeatedly dividing the larger number by the smaller number until the remainder is 0. The last non-zero remainder is the GCD.

What is an example of finding the GCD of two powers of 2, minus 1?

For example, to find the GCD of 2^3 - 1 and 2^5 - 1, we divide 2^5 - 1 by 2^3 - 1, which gives a remainder of 7. Then we divide 2^3 - 1 by 7, which gives a remainder of 0. Therefore, the GCD of 2^3 - 1 and 2^5 - 1 is 7.

Why is the GCD of two powers of 2, minus 1 important?

The GCD of two powers of 2, minus 1 is important in number theory and cryptography. It is used in various algorithms and calculations, such as finding the multiplicative inverse in modular arithmetic and checking for primality in large numbers.

Can the GCD of two powers of 2, minus 1 be greater than 1?

Yes, the GCD of two powers of 2, minus 1 can be greater than 1. For example, the GCD of 2^4 - 1 and 2^6 - 1 is 15. This indicates that the two numbers have at least one common factor other than 1, making them not relatively prime.

Similar threads

Replies
3
Views
2K
Replies
1
Views
1K
Replies
1
Views
5K
Replies
1
Views
826
Replies
27
Views
4K
Replies
2
Views
2K
Replies
1
Views
946
Replies
5
Views
2K
Back
Top