0

Determine the $\gcd$ and $\text{lcm}$ of $\,n^{2}+1$ and $\,n(n^{2}-1)$

My attempt :

Let: $\ d\mid n^{2}+1 $ and $\,d\mid n(n^{2}-1) $

Then: $\ d\mid n(n^{2}+1)-n(n^{2}-1) = 2n$

For example: $n=2$ then $d=1$ ??

$n=3$ then $d=2$

I'm correct or no ??

And what about $\text{lcm}$ ??

Bill Dubuque
  • 272,048

2 Answers2

2

Hint: $\ (\color{#c00}{n^2\!+\!1,n)=1}\,$ so $\,(\color{#c00}{n^2\!+\!1,n}(n^2\!-\!1)) = (n^2\!+\!1,n^2\!-\!1) = (2,n^2\!-\!1) = (2,n\!-\!1)$

Finally, recall that the lcm is the product over the gcd $ = (n^5-n)/(2,n\!-\!1).\,$ Your inference is correct but you need to go further as above to obtain the gcd.

Bill Dubuque
  • 272,048
0

The extended Euclidean algorithm in $\mathbb Q[n]$ gives: $$ 4=(4-2n^2)(n^2+1)+(2n)(n(n^2-1)) $$ Therefore, $\gcd(n^2+1,n(n^2-1))=1,2,4$. Since $4$ never divides $n^2+1$, we have that $\gcd(n^2+1,n(n^2-1))=2,1$, according to whether $2$ divides $n^2+1$ or not. In other words, $\gcd(n^2+1,n(n^2-1))=\gcd(n^2+1,2)=\gcd(n+1,2)$.

Then $\operatorname{lcm}(n^2+1,n(n^2-1))=\dfrac{(n^2+1)(n(n^2-1))}{\gcd(n^2+1,n(n^2-1))}=\dfrac{n^5-n}{\gcd(n+1,2)}$.

lhf
  • 216,483