Computing $\gcd$ of very large numbers with powers

649 Views Asked by At

How to calculate $\gcd$ of $5^{2^{303} - 1} - 1$ and $5^{2^{309} - 1} - 1$?

I stumbled upon this interesting problem and tried elementary algebraic simplification and manipulation. But found no success.

1

There are 1 best solutions below

2
On

Hint:

$$gcd(5^a - 1,5^b -1) = 5^{gcd(a,b)} -1$$