Show $\frac{(p^d - 1)(p^{d-1} - 1)}{(p-1)(p^2 - 1)} \equiv 1 \pmod{p}$. Let $p$ be prime and $d \ge 2$. I want to show that
$$
 \frac{(p^d - 1)(p^{d-1} - 1)}{(p-1)(p^2 - 1)} \equiv 1 \pmod{p}.
$$
I have a proof, but I think it is complicated, and the statement appears in a book as if it is very easy to see. So is there any easy argument to see it?
My proof uses
$$
 \frac{p^n - 1}{p-1} = 1 + p + \ldots + p^{n-1}.
$$
So
$$
 \frac{(p^d - 1)(p^{d-1} - 1)}{(p-1)(p^2 - 1)} = \frac{(1 + p + \ldots + p^{d-1})(1 + p + \ldots + p^{d-2})}{p+1}
$$
If $d - 2$ is odd, set $u := (1 + p + \ldots + p^{d-1})$ and then proceed 
\begin{align*}
 & \frac{u(1 + p + \ldots + p^{d-2})}{p+1} \\
 & = \frac{u(1+p) + u(p^2 + \ldots + p^{d-4})}{p+1} \\
 & = u + p^2\cdot \frac{u(1+p+\ldots + p^{d-4})}{p+1} \\
 & = u + p^2\cdot \left( \frac{u(1+p) + u(p^2 + \ldots p^{d-4})}{p+1} \right) \\
 & = u + p^2\cdot \left( u + p^2\cdot \frac{u(1+p+\ldots p^{d-6})}{p+1} \right) \\
 & \quad \qquad\qquad \vdots \\
 & = u + p^2\cdot \left( u + p^2 \left( u + p^2\left( u + \ldots + p^2 \frac{u(1+p)}{1+p} \right) \right) \right) \\
 & = u + p^2\cdot ( u + p^2 \cdot ( u + p^2 ( u + \ldots + p^2 u ))) \\
 & \equiv u \pmod{p} \\
 & \equiv 1 \pmod{p}
\end{align*} 
and similar if $d-1$ is odd then successively multiply $(1+p+\ldots + p^{d-1})$ out with $v := (1+p+\ldots p^{d-2})$. But as said, this seems to complicated for me, so is there another easy way to see this?
 A: You need to prove that $p\mid\frac{(p^{d-1}-1)(p^d-1)}{(p-1)(p^2-1)}-1$
It is not difficult to see that $p\mid (p^{d-1}-1)(p^d-1)-(p-1)(p^2-1)$. Furthermore, we have that $(p-1)(p^2-1)\mid (p^{d-1}-1)(p^d-1)$ because either $d$ or $d-1$ is even and so either $p^{d}-1$ or $p^{d-1}-1$ is divisible by $p^2-1$ and the other factor is then divisible by $p-1$.
So to sum up, we have proven that:
$$
p\mid (p^{d-1}-1)(p^d-1)-(p-1)(p^2-1)
$$
and 
$$
(p-1)(p^2-1)\mid (p^{d-1}-1)(p^d-1)-(p-1)(p^2-1)
$$
Now, because $\gcd(p,(p-1)(p^2-1))=1$, this implies:
$$
p(p-1)(p^2-1)\mid (p^{d-1}-1)(p^d-1)-(p-1)(p^2-1)\implies\\
p\mid \frac{(p^{d-1}-1)(p^d-1)}{(p-1)(p^2-1)}-1
$$
A: There are even easier proofs than the answers others have supplied. If you look at the numerator, one of the terms is guaranteed to be divisible by $p^2-1$, whichever has an even exponent. This is because $(x^2-1)|(x^{2n}-1)$. The division clearly results in a polynomial with constant term $1$, as does the division of the other term by $p-1$. Then their product does as well, and so taking the expression mod p gives 1.
Alternatively, we observe that 
$p^d=0$ (mod p) and then just be done. This means that the fraction trivially simplifies to $$\frac{(-1)^2}{(-1)^2}=1$$
