5

Prove that $12 \mid n^2 - 1$ if $\gcd(n,6)=1$.

I know I have to use Fermat's Little Theorem for this but I am unsure how to do this problem.

Zev Chonoles
  • 129,973
user72195
  • 1,557
  • 3
  • 18
  • 30

4 Answers4

5

As is mentioned in answers above, $gcd(n,6)=1$ clearly implies that $n$ is odd. But then each of $n+1$ and $n-1$ are even, so $4$ divides $(n+1)(n-1)=n^2-1$. Thus it is only left to show that $3$ also divides $n^2-1$. But given any three consecutive integers, we know that $3$ must divide exactly one of them. Applying this to $n-1,n,n+1$, and using the fact that $3$ cannot divide $n$ (since $gcd(n,6)=1$), we get the desired result.

Doc
  • 1,966
  • +1 for the last part...Applying this to $n-1$,$n$,$n+1$ and using the fact that $3$ cannot divide $n$ (since $\gcd(n,6)=1)$), we get the desired result. I like how you did it without Fermat's little theorem. – user66733 Sep 23 '13 at 01:28
  • Thanks! I guess it's the result of my not being a number theorist :-) – Doc Sep 23 '13 at 01:35
4

Can you conclude that $\gcd(n,2)=1$ and $\gcd(n,3)=1$? What about $\gcd(n,4)=1$?

Can you show that $3 \mid n^2-1$ and $4 \mid n^2-1$? Because if yes, then you're done. Do you know why?

I leave the part $3 \mid n^2-1$ to you, because it's clear I think. Notice that if $\gcd(n,2)=1$ then $n$ must be an odd number. You can write $n^2-1=(n+1)(n-1)$ If $n$ is odd, and it must be if $\gcd(n,2)=1$ then $(n+1)$ and $(n-1)$ will both be even. so $n^2-1$ is divisible by $4$ and $4 \mid n^2-1$.

user66733
  • 7,379
  • how do you know that $n^2$ -1 is divisible by 4 if ($n$ + 1) and ($n$ - 1 are both even? – user72195 Sep 23 '13 at 01:05
  • 1
    @user72195 because we can write $n+1=2k$ and $n-1=2q$. If you multiply them $n^2-1 = (n+1)(n-1) = 4kq$ which means $n^2-1$ is divisible by 4. You can also say it in essentially the same way with a different appearance that if $a \mid c$ and $b \mid d$ then $ab \mid bc$. So, if $2 \mid n+1$ and $2 \mid n-1$ then $4 \mid n^2-1$. – user66733 Sep 23 '13 at 01:07
  • since we know that 3 and $n$ are relativily prime to each other, is that why 3|$n^2$ - 1? – user72195 Sep 23 '13 at 01:17
  • @user72195 Yes. You need $(3,n)=1$ that you can apply Fermat's little theorem. Once you know that then notice that $3|n^2-1$ is the same as $n^{3-1} \equiv 1 \pmod{3}$ and we know the later one is true because of Fermat's little theorem. – user66733 Sep 23 '13 at 01:19
  • okay. So now I have concluded that 12|($n^2$-1)($n^2$-1) but how does that show 12|($n^2$-1)? – user72195 Sep 23 '13 at 01:23
  • @user72195: Do you know the definition of least common multiple? If not, you'll need it. There's a theorem that if $(a,b)=1$ and $a \mid c$ and $b \mid c$ then $ab \mid c$. This comes from a more general theorem that $(a,b)[a,b]=|ab|$ where $[a,b]$ is the least common multiple of $a$ and $b$. And $(3,4)=1$, so? – user66733 Sep 23 '13 at 01:26
4

If $\gcd(n,6) = 1$, then $n$ is odd. Hence, $n^2 \equiv 1 \pmod8$. Further, $\gcd(n,3) = 1$ and hence $n^2 \equiv 1 \pmod3$. Now conclude that $n^2 \equiv1 \pmod{24}$.

2

If $\gcd(6,n)=1$ then $n=6k\pm 1$. This yields $$n^2-1=36k^2\pm 12k+1-1=12k(3k\pm 1)$$ So $12\mid n^2-1$.

cansomeonehelpmeout
  • 12,782
  • 3
  • 22
  • 49