I've been stuck on this problem for a long time. I must show all gcd of $(n^3-n, 2n^2-1)$. I know that $n^3-n=n(n+1)(n-1)$ and so I must find all gcd of $(n(n+1)(n-1), 2n^2-1)$. But I don't know how. Can somebody help me ?
-
2Do you know Euclidean Algorithm? – Lynnx Sep 24 '20 at 15:54
-
Yes but I do not know if this algorithm works with varialbes. Does it? – Aezir Sep 24 '20 at 16:49
-
It works. Euclidean Algorithm – Lynnx Sep 24 '20 at 17:10
-
I added an answer that makes it obvious (and generalizes). – Bill Dubuque Sep 24 '20 at 23:34
7 Answers
You have $$\gcd(n^3-n,2n^2-1)=\gcd(2n^3-2n,2n^2-1) \space\space(\text{since $2n^2-1$ is odd})$$ $$=\gcd(2n^3-2n-n(2n^2-1),2n^2-1)$$ $$=\gcd(-n,2n^2-1)$$ $$=\gcd(-n,2n^2-1+2n(-n))$$ $$=\gcd(-n,-1)=\gcd(n,1)=1.$$

- 10,599
$gcd(n^3-n,2n^3-1)$ divides $n$ since $2(n^3-n)-n(2n^2-1)=2n^3-2n-2n^3+n=-n$. We deduce that $gcd(n^3-n,2n^2-1)$ divides $gcd(2n^2-1,n)$ since
We have $2n^2-1-2n(n)=-1$, $gcd(2n^2-1,n)=1$ this implies that $gcd(n^3-n,2n^2-1)=1$.

- 87,475
We have $n$ coprime with $2n^2-1$ (any common factor would have to divide $1$), so we can divide $n$ from $n^3-n$ to get $\gcd(n^2-1, 2n^2-1)$. Now just notice $(2n^2-1)=2(n^2-1)+1$, and so $\gcd(n^2-1, 2n^2-1)=1$ (again common factor would have to divide $1$).

- 16,612
I'd do it the way I did below without factoring. But factor was a good thought and it will work:
$n^3-n = n(n+1)(n-1)$ so lets see what factors $n,n+1, n-1$ have with $2n^2 -1$.
First of all any (nontrivial) factor of $n$ will be a factor of $2n^2$ and will not be a factor of $2n^2 -1$. So $n$ and $2n^2 -1$ have no factors in common and $n$ doesn't "contribute" to the gcd. So $\gcd(n(n+1)(n-1), 2n^2-1)= \gcd((n+1)(n-1),1)$.
Now do $n+1$ and $2n^2 -1$ have any factors in common? Note: $2n^2 -1 = 2(n^2 -1) +1= 2(n+1)(n-1) + 1$. So any non trivial factor that $n+1$ will have will also be a factor of $2(n+1)(n-1)$ so it will not be a factor of $2(n+1)(n-1)-1$. $n+1$ and $2n^2 -1$ will have not factor in common.
And by the same argument neither will $n-1$ and $2(n+1)(n-1)+1 = 2n^2 -1$.
So $2n^2-1$ has no factors in common with any of the factors of the factorization of $n(n+1)(n-1)$ so the $\gcd(n^3 -n, 2n^2 -1) = 1$.
=====My way=====
use $\gcd(a,b) = \gcd(a \pm kb, b)$. And use if $\gcd(k,b) =1$ then $\gcd(ka,b)=\gcd(a,b)$
So $\gcd(n^2 -n, 2n^2-1)$; $2n^2-1$ is odd any common divisor is odd and multiplying $n^2-n$ by $2$ will not effect the $\gcd$. So:
$\gcd(n^3 -n, 2n^2-1)= \gcd(2n^3-2n,2n^2-1)$. Whatever common divisor they have divides $2n^2 -1$ and $2n^3-2n$ so it will divide $n(2n^2-1)$ and will divide $(2n^3-2n)-n(2n^2-1)$
So $ \gcd(2n^3-2n,2n^2-1)= \gcd([2n^3-2n]-n[2n^2 -1],2n^2-1) = \gcd(n,2n^2-1)$.
$\gcd(n,2n^2-1) = \gcd(n, [2n^2-1] -[(2n)n]) = \gcd(n, -1)$ and as the only thing that divide $-1$ are $1, -1$ and $1 > -1$ then $\gcd(n,-1) = 1$.

- 124,253
-
i.e. $,n,n-1,n+1,$ are all coprime to $2n^2-1,$ (e.g. via Euclidean algorithm), hence so too is their product, as I explain in my answer. – Bill Dubuque Sep 24 '20 at 23:38
This answer is not different in substance, but in presentation from previous answers.
Assume some prime number $p$ divides both $n^3-n$ and $2n^2-1$.
$n^3-n=n(n^2-1)$, so either $p\mid n$ or $p\mid (n^2-1)$
Case 1: $p\mid n \Rightarrow p\mid 2n^2$, whence $p\mid 2n^2-1 \Rightarrow p\mid 1$; there is no such $p$.
Case 2: $p\mid (n^2-1) \land p\mid (2n^2-1) \Rightarrow p\mid ((2n^2-1)-(n^2-1))\Rightarrow p\mid n^2$. This reduces to Case 1, where it was already shown there is no such $p$
The assumption that there is some prime number $p$ which divides both $n^3-n$ and $2n^2-1$ is false, which implies $\gcd (n^3-n),(2n^2-1)=1$

- 7,288
If $p\mid n^3-n, 2n^2-1$ then $$p\mid 2[2(n^3-n)-n(2n^2-1)]^2-(2n^2-1)=1$$

- 12,782
- 3
- 22
- 49
-
Pulled the Bezout equation out of a hat - like magic - leaves a bit to be desired pedagogically. It can be mechanically calculated by the Extended Euclidean algorithm. – Bill Dubuque Sep 24 '20 at 23:08
Hint: $\,n,n\pm1\,$ are all coprime to $\,f(n)=2n^2\!-\!1\,$ because $\,\overbrace{\color{#c00}{f(a)} = \pm1}^{\textstyle a=0,\pm1}\,$ in Euclidean algorithm:
$\ \gcd(f(n),\,n\!-\!a)\, =\, \underbrace{\gcd(\color{#c00}{f(n)\bmod n\!-\!a},\, n\!-\!a) \,=\, \gcd(\color{#c00}{f(a)},\,n\!-\!a)}_{\textstyle\text{Polynomial Remainder } \color{#c00}{\rm Theorem}}$
Therefore their product $\,n^3\!-\!n\,$ is also coprime to $f(n).\ \ \small\bf QED$

- 272,048