gcd(2ΒΉβ°β° β 1, 2βΆβ° β 1)
Need a hint?
Run Euclid's algorithm on the exponents: β 1 and β 1 behave like a and b.
gcd( β 1, β 1) = β 1 = 1,048,575.
How to work it out
For write . A common divisor of the first two numbers on the right divides the sum, so
(1)The exponents change exactly as in Euclid's algorithm, so repeating this step ends at the gcd of the exponents:
(2)Here , so
(3)
LaTeX source of the formulas on this page
\[ 2^{20}-1=1048575 \]
\[ \gcd(2^a-1,\,2^b-1)=\gcd(2^b-1,\,2^{a-b}-1) \]
\[ \gcd(2^a-1,\,2^b-1)=2^{\gcd(a,b)}-1 \]
\[ \gcd\left(2^{100}-1,\,2^{60}-1\right)=2^{20}-1=1\,048\,575 \]Questions
What is the answer to: gcd(2ΒΉβ°β° β 1, 2βΆβ° β 1)?
gcd( β 1, β 1) = β 1 = 1,048,575.
What is the key idea?
The gcd of β 1 and β 1 is 2^gcd(a,b) β 1.
Is there a hint?
Run Euclid's algorithm on the exponents: β 1 and β 1 behave like a and b.