Problem: Let $n, k \ge 2$ be positive integers and let $a_1$, $a_2$, $a_3$, \dots, $a_k$
be distinct integers in the set $\left\{ 1,2,\dots,n \right\}$
such that $n$ divides $a_i(a_{i+1} - 1)$ for $i = 1,2,\dots,k-1$.
Prove that $n$ does not divide $a_k(a_1 - 1)$.

Solution: We proceed indirectly and assume that
\[ a_i (a_{i+1}-1) \equiv 0 \pmod n \]
for $i = 1, \dots, k$ (indices taken modulo $k$).
We claim that this implies all the $a_i$ are equal modulo $n$.

Let $q = p^e$ be any prime power dividing $n$.
Then, $a_1 (a_2 - 1) \equiv 0 \pmod q$, so $p$ divides either $a_1$ or $a_2-1$.
\begin{itemize}
  \ii If $p \mid a_1$, then $p \nmid a_1 - 1$. Then
  \[ a_k (a_1-1) \equiv 0 \pmod q \implies a_k \equiv 0 \pmod q. \]
  In particular, $p \mid a_k$.
  So repeating this argument,
  we get $a_{k-1} \equiv 0 \pmod q$, $a_{k-2} \equiv 0 \pmod q$, and so on.

  \ii Similarly, if $p \mid a_2 - 1$ then $p \nmid a_2$, and
  \[ a_2 (a_3-1) \equiv 0 \pmod q \implies a_3 \equiv 1 \pmod q.  \]
  In particular, $p \mid a_3 - 1$.
  So repeating this argument,
  we get $a_4 \equiv 0 \pmod q$, $a_5 \equiv 0 \pmod q$, and so on.
\end{itemize}
Either way, we find $a_i \pmod q$ is constant (and either $0$ or $1$).

Since $q$ was an arbitrary prime power dividing $n$,
by Chinese remainder theorem we conclude that $a_i \pmod n$ is constant as well.
But this contradicts the assumption of distinctness.