Prove $n$ and $n^2-n+1$ are co-prime.

124 Views Asked by At

Prove $n$ and $n^2-n+1$ are co-prime for $n\ge1$.

Since $n$ divides $n^2-n$, therefore $n$ cannot divide $n^2-n+1$.

But it might be possible for some integer $p$ to divide both $n$ and $n^2-n+1$.

How do I show such an integer $p$ does not exist ? Hints appreciated.

2

There are 2 best solutions below

0
On BEST ANSWER

Since $$n^2-n+1 - (n(n-1)) = 1,$$ any number $k$ dividing $n^2-n+1$ and $n$ divides the difference above, i.e. divides $1$. So $k$ is just $\pm 1$.

0
On

Your proof is actually complete if you consider the euclidean algorithm, but let's say you want extra safety.

If an integer $p$ divides $n$, that means we may write $n = mp$ for some integer $m$. Thus we have $$ n^2 - n + 1 = m^2p^2 - mp + 1 = (m^2p - m)p + 1 $$ Now, $p$ divides $(m^2p - m)p$, so if it is to divide $(m^2p - m)p + 1$ as well, it must divide $1$.