2
$\begingroup$

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.

  • 1
    Notice that this also holds for $n=1$. More generally, if $k : \Bbb N \to \Bbb N$ is any function, then $n$ and $nk(n)+1$ are coprime for any $n \geq 1$.2017-01-14

2 Answers 2

4

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$.

2

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$.