Solving the congruence $2x^3 - 3x^2 + 1 \equiv 0 \pmod{49}$ I'm trying to solve the congruence $f(x) = 2x^3 - 3x^2 + 1 \equiv 0 \pmod{49}$.
I wrote $f(x)=(x-1)^2(2x+1)$, and I found that it has eight solutions. One solution is $24$, and the others are of the form $7k+1$, where $k = 0, 1, \ldots, 6$.
Are these the only ones?
 A: Yes they are the only solutions.
Your congruence is equivalent to finding $49$ divides $(x-1)^2(2x+1)$ and this implies that:


*

*Either $7$ divides $x-1$ hence $x=1+7k$ which gives you $7$ solutions.

*Or $7$ does not divide $x-1$ and in this case $49$ divides $2x+1$ hence $x\equiv 24 \mod 49$

A: Note that if $\,p\,$ is prime then $\,p^2\mid a^2 b\iff p\mid a\,$ or $\,p^2\mid b.\,$ 
For if $\,p\nmid a\,$ then $\,(p,a)=1\,\overset{\rm\color{#c00}{EL}}\Rightarrow\, (p^2,a^2)=1,\,$ so $\,p^2\mid a^2b\,\overset{\rm\color{#c00}{EL}}\Rightarrow\,p^2\mid b,\,$ by $\rm\color{#c00}{EL} = $ Euclid's Lemma (or the Fundamental Theorem of Arithmetic). The converse is clear.
Applied to the OP we have $\ 7\mid (x\!-\!1)^2(2x\!+\!1)\iff \color{#0a0}{7\mid x\!-\!1}\,$ or $\,49\mid 2x\!+\!1\iff \color{#80f}{49\mid x\!-\!24}\,$ since $\ {\rm mod}\ 49\!:\ 2x\equiv -1\equiv 48\iff x\equiv 24\,$ (by cancelling $\,2,\,$ valid by $\,(2,49)=1).$
Thus the solutions are $\,\color{#0a0}{x\equiv 1\pmod 7} \iff  x\equiv 1\!+\!7j\equiv 1,8,15,22,29,36,43\pmod{49}$ union $\,\color{#80f}{x\equiv 24 \pmod{49}}$
