0

I got hold of the answer but I'm puzzled by two of the lines. Hoping someone can explain why how the solution is derived for the characters in bold.

First, let's observe $\gcd(a,b) = 1$

$n^6 + 3n^2 + n + 4$ can thus be expressed as: //using symbolab calculator
$$(n^6+3n^2+n+4) = (n^4-n^2+4)(n^2+1)+n$$

And $n^2 + 1$ can be expressed as:
$$n^2+1 = n(n)+1$$

Second, we observed that the Property of GCD is $\gcd(a,b) = \gcd(a-kb, b)$, $∀k∈ℤ$

$\gcd(n^6 + 3n^2 + n + 4, n^2 + 1)$
$= \gcd(n^6+3n^2+n+ 4)-(n^4-n^2+4)(n^2+1), n^2+1$ //using symbolab calculator
$= \gcd(n, n^2+1)$
$= \gcd(n, n^2+1-n(n))$
$= \gcd(n, 1) = 1$

The thing that I do NOT understand is why they did NOT use "+n" in the equation below.
$$= \gcd(n^6+3n^2+n+ 4)-(n^4-n^2+4)(n^2+1), n^2+1$$

Shouldn't the $+n$ be in since $kb$ is $(n^4-n^2+4)(n^2+1)+n$?

Also, why do we need to minus off with "n(n)" in the second last line [$= \gcd(n, n^2+1-n(n))$]?

Appreciate any expert advice.

Thank you.

Gary
  • 31,845
nmr
  • 19
  • 1
    "Shouldn't the +n be in since "kb" is (n^4-n^2+4)(n^2+1)+n ?" Huh? No. The $b$ is $n^2 +1$ and the $k$ is $(n^4-n^2+4)$ so $kb$ is $(n^4-n^2+4)(n^2+1)$. Why on earth did you put the $+n$ in? – fleablood Oct 31 '22 at 04:39
  • "Also, why do we need to minus off with "n(n)" in the second last line [=gcd(n,n2+1−n(n))]?" Because it will get us down to $1$ which is the perfect desire for a term in a gcd expression. – fleablood Oct 31 '22 at 04:41
  • 1
    See The Euclidean algorithm for an explanation of what's happening. It is true that the stated gcd property is being used. However, the reason why one chooses a particular $k$ is outlined there, and it basically comes from polynomial division. You should read up on that algorithm before you try similar questions. – Sarvesh Ravichandran Iyer Oct 31 '22 at 04:43
  • 1
    This is essentially figuring out that $\gcd(18, 103) = 1$. $\gcd(18,103)=\gcd(18,103-5\cdot 18)=\gcd(18, 13) = \gcd(18-13, 13)=\gcd(5,13)=\gcd(5,13-2\cdot 5) =\gcd(5,3)=\gcd(5-3,3)=\gcd(2,3)=\gcd(2,3-1)=\gcd(2,1) = 1$. Can you understand how that works? They example given is exactly the same but with polynomials rather than integers. – fleablood Oct 31 '22 at 04:45
  • They are using the (polynomial) euclidean algorithm $(a,b) = (a\bmod b,b)$ where $a\bmod b = a-kb$ is the smaller (degree) remainder left on dividing the polynomial $a$ by $b$, and $k$ is the quotient. In both steps the divisor has lead coef $1$ so the division is fraction free. As explained in the linked dupe, the key idea of the division algorithm is to choose the quotient so that the leading terms cancel - so reducing the degree. – Bill Dubuque Oct 31 '22 at 07:41
  • Since we need only the remainder (not the quotient $k$) it's easier to use modular arithmetic as below $$\begin{align}&\bmod n^2+1!:,\ \color{#c00}{n^2\equiv -1},\Rightarrow, (\color{#c00}{n^2})^3+3\color{#c00}{n^2}+n+4\equiv(\color{#c00}{-1})^3+3(\color{#c00}{-1})+n+4\equiv \color{#0a0}n\[.2em]
    &\qquad, \bmod, n!:\quad\ \ \color{#0a0}{n\equiv 0},\Rightarrow, \color{#0a0}n^2+1\equiv \color{#0a0}0^2+1\equiv 1\end{align}\qquad$$
    – Bill Dubuque Oct 31 '22 at 07:42
  • See here and its links for how to handle the case when the lead coef of the divisor is not $\pm 1\ \ $ – Bill Dubuque Oct 31 '22 at 07:50
  • Thank you everyone for explaining. Especially @fleablood who has been especially helpful! Muchos gracias! – nmr Nov 01 '22 at 03:10

0 Answers0