Proof Regarding Relative Primality

56 Views Asked by At

I have been trying to prove this fact, but I am still stuck. How can I prove that $n^2 - n + 1$ and $n^2 + n - 1$ are relatively prime for any integer $n$? In other words, that their $gcd$ is $1$. My approach so far is to assume that there exists a divisor $> 1$ and try to arrive at a contradiction, but I am failing to arrive at a contradiction. Or is there any other way to prove it?

2

There are 2 best solutions below

2
On

$(n^2+n-1,n^2-n+1) = (n^2-n+1,2n-2)=(n^2-n+1,n-1) = (n-1,1)=1$

$(n^2-n+1,2n-2)=(n^2-n+1,n-1)$ because $2 \not| n^2-n+1$ since its always odd number.

Edit : to prove that $ n^2-n+1$ is always odd once substitute for $n=2k$ even integers and once $n=2k+1$ odd integers and show in every case the result we get is odd.

0
On

Using the Extended Euclidean Algorithm applied to polynomials we find that: $$(n+2)(n^2−n+1) - n(n^2+n−1) = 2$$

Any common factor of $n^2−n+1$ and $n^2+n−1$ divides the left hand side, so also divides $2$. It cannot actually be $2$ because $n^2+n−1 = n(n+1)−1$ is always odd (one of $n$ or $n+1$ must be even). Therefore the only possible common factor is $1$.