# Prove that if $a \mid n$ then $a^2\mid (n + 1)(n − 1) + 1$

I have this review question for an exam and I was hoping someone can help me solve it:

Prove that if $a \mid n$ then $a^2\mid (n + 1)(n − 1) + 1$

this is what I have so far, not sure if it is right:

$a^2\mid (n + 1)(n − 1) + 1$

$=(n+1)(n-1)+1$

$=n^2-n+n-1+1$

$=n^2$

• Add $a\mid n\,\Rightarrow\, a^2\mid n^2$ to your proof and you're done. Commented May 7, 2015 at 23:53

You're right. $(n+1)(n-1) + 1 = n^2$. Therefore, $a^2 \mid (n+1)(n-1) + 1$ is exactly the same statement as $a^2 \mid n^2$, even though it looks slightly different.
Now, if $a\mid n$, that means that $n = a\cdot m$ for some integer $m$. What can you say about $n^2$?
• should I substitute a number for $n$? Commented May 7, 2015 at 23:55
• @Csci319 I just told you that $n = a\cdot m$. If you substitute that, you get that the statement $a^2 \mid n^2$ is the same as $a^2 \mid a^2\cdot m^2$, which is definitely true. Therefore what you originally wanted to show is also true. Commented May 7, 2015 at 23:57
$a\mid n\implies a^2\mid n^2 = n^2-1+1=(n+1)(n-1)+1$
This uses the common useful factorization $(A+B)(A-B)=A^2-B^2$ and the fact $a\mid n\ \,\Rightarrow\,\ a^2\mid n^2$, which can be seen by $a=n(k)\,\Rightarrow\, a^2=n^2(k^2)$ by definition of divisibility.