Q:

Proving divisibility $x^2\Big|\frac{(xy+1)^n-1}{(xy+1)-1}$.

Let $x\in\mathbb{Z}$ be a prime number and let $y=1,2,\ldots,x-1\in\mathbb{Z}$. How to prove that $$x^2\Big|\frac{(xy+1)^n-1}{(xy+1)-1}$$ if and only if $n=x^2k,\; k\in\mathbb{Z}$? Should the binomial expansion be used? 

A:

Hint: Use the binomial expansion, and then get rid of every term that you know is a multiple of $x^2$.  What remains is a multiple of $x^2$ if and only if the original expansion was a multiple of $x^2$.

