# are two consecutive numbers relatively prime?

I have a question.

I have been given this proof: "For any $n$ in the integers where $n>2$, show there are at least $2$ elements in $U(n)$ that satisfy $x^2=1$."

I have gone through and actually proved this, (that the numbers are $1$ and $n-1$) but i didn't' know how to prove that $n-1$ is in fact in the set $U(n)$. Is it because two consecutive numbers are always relatively prime?

-
What is $U(n)$? – Sigur Feb 7 '13 at 0:22
@Sigur: $U(n)$ is the multiplicative group of integers mod $n$ that are relatively prime to $n$. – Brian M. Scott Feb 7 '13 at 0:23
Yes, that is why, and Jason Bourne has just supplied a proof. – Brian M. Scott Feb 7 '13 at 0:24
$-1$ is an integer. – jspecter Feb 7 '13 at 0:31

$n$ is coprime to $n-1$, for if $d$ divides $n$ and $d$ divides $n-1$, then $d$ divides $n-(n-1)=1$.
$n$ is coprime to $n−2$, for if $d$ divides $n$ and $d$ divides $n−2$, then $d$ divides $n−(n−2)=2$ ? – alancalvitti Feb 7 '13 at 2:14