gcd($4n$,$2n+1$) for $n \in N$ using Euclid's algorithm

165 Views Asked by At

Using the Euclid's algorithm, find the gcd($4n$,$2n+1$) for $n \in N$ and express it as a linear combination of $4n$ and $2n+1$.

I started by testing different values for n:

$n = 1$ $\rightarrow$ gcd($4(1)$,$2(1)+1$) = 1

$n = 2$ $\rightarrow$ gcd($4(2)$,$2(2)+1$) = 1

$n = 3$ $\rightarrow$ gcd($4(3)$,$2(3)+1$) = 1

.

.

.

You can see that $2n+1$ is going to be the odd numbers, but I don’t know how to associate this with Euclid's algorithm.

And with respect to the linear combination I just know it can be the way:

For $4n = (2n+1)(?)+??$ and for $2n+1 = (2n-1)(?)+??$

but I don’t know how to go on, I hope you can help me :)

3

There are 3 best solutions below

0
On

Well, $\frac{4n}{2n+1}<2$, so our first multiplicand must be $1$: $$4n=(2n+1)(1)+(2n-1)$$ Same with our second: $$2n+1=(2n-1)(1)+2$$ Then $$2n-1=2(n-1)+1$$ So our GCD is $1$

0
On

An elementary approach

Let's define $gcd(4n, 2n+1)=d$,

Then by definition of the greatest common divisor, it follows that

$$d \mid 4n\,\,\,\ , d\mid 2n+1$$

Therefore $d \mid -4n+2(2n+1)=2$ from which it follows that $d=1$

( $d \mid 2n+1$ , forces $d=1$)

Alternatively we can just write $$gcd(4n,2n+1)=gcd(-2,2n+1)=1$$, as the terms under consideration have the opposite parity

1
On

$$4n = 1\cdot (2n+1)+(2n-1)$$ $$2n+1=1\cdot (2n-1)+2$$ $$2n-1=(n-1)\cdot 2+1$$

By backward substitution, $$1=(2n-1)-(n-1)\cdot 2$$ $$\Rightarrow 1=(2n-1)-(n-1)\cdot((2n+1)-1\cdot (2n-1))$$$$\Rightarrow 1=1\cdot (2n-1)-(n-1)\cdot (2n+1)+(n-1)\cdot (2n-1)$$ $$\Rightarrow 1=n\cdot (2n-1)-(n-1)\cdot (2n+1)$$ $$\Rightarrow 1=n\cdot (4n-1\cdot (2n+1))-(n-1)\cdot (2n+1)$$ $$\Rightarrow 1=n\cdot (4n)-n\cdot (2n+1)-(n-1)\cdot (2n+1)$$ $$\Rightarrow 1=n\cdot (4n)-(2n-1)\cdot (2n+1),$$ which expresses $1=\gcd(4n,2n+1)$ as a linear combination of $4n$ and $2n+1$.

Remark. The fact $1=\gcd(4n,2n+1)$ can be seen directly without the Division Algorithm. For example, let $d=\gcd(4n,2n+1)$. Then for any prime divisor $p~|~d$, $p$ must divide $4n$, so either $p=2$ or $p~|~n$. For each case, $p~\nmid (2n+1)$. It follows that $d=1$.