Prove that difference between two consecutive cubes cannot be divided by $5$.
Here's what I've done, but I'm not sure about one step:
Let two cubes be $(a+1)^3$, and $a^3$. $$(a+1)^3 - a^3 = 3a^2+3a+1$$. Suppose for a moment that it is actually divisible by $5$, then we must have $3a^2 +3a+1=5k$ for some $k$.
This implies that $3a^2+3a\equiv-1\pmod 5$. This in turn translates to equation: $$[3a^3 + 3a]=[-1]=[4]$$ since we are working in $\text{Z}_5$. (Not sure about this part)
Since there are only 5 elements in $\text{Z}_5$, we can just test them all. And indeed there's no solution in $\text{Z}_5$. So $5$ cannot divide two consecutive cubes.
Can someone explain in detail why we can translate an equation into a "modulo equation"? Thanks.
The function $\eta : i \mapsto [i]$ that maps $\mathbb{Z}$ to $\mathbb{Z}_5$ is a homomorphism, i.e., it satisfies $\eta(x + y) = \eta(x) + \eta(y)$ and $\eta(xy) = \eta(x)\eta(y)$. If you take a polynomial in $a$, like $f(a) = (a + 1)^3 - a^3 = 3a^2 + 3a + 1$, then $\eta(f(a)) = f_5(\eta(a))$, where I am writing $f_5$ for the "same" polynomial as $f$ but with the coefficients taken over $\mathbb{Z}_5$ (i.e., $[3]a^2 + [3]a + [1]$). Because $\eta$ is a homomorphism it will translate valid equations between polynomials over $\mathbb{Z}$ into valid equations between polynomials over $\mathbb{Z}_5$. (The "converse" of this is false, e.g., $(x^2 - 1)(x^2 - 4)x = 0 $ is valid over $\mathbb{Z}_5$, but not over $\mathbb{Z}$.)