Are 15,462,227 and 15,462,229 relatively prime?
How do I construct a proof for this.
I know that for n and n+2 to be relatively prime it is the case that n has to be odd. Is this the only requirement for these numbers to be relatively prime?
Are 15,462,227 and 15,462,229 relatively prime?
How do I construct a proof for this.
I know that for n and n+2 to be relatively prime it is the case that n has to be odd. Is this the only requirement for these numbers to be relatively prime?
On
Calculate the GCD by Euclid's algorithm! The GCD of n and n+2 is the GCD of 2 and n, which is 1 if n is odd.
On
In general the way to answer this question is the Euclidean algorithm. In this case it's very simple (one step):
$$ 15,462,229 = 15,462,227 + 2 $$
so the greatest common divisor of the two numbers in question is the same as the greatest common divisor of either and $2$. That's clearly $1$.
Hint: $\gcd(a,b)=\gcd(a,b-a)$.