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.
&\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