# Number of solutions of a polynomial in $p$-adic integers

I want to determine the number of solutions of $$f(x)=x^{19}-3x+2=0$$ over $$\mathbb{Z}_{19}$$ and $$\mathbb{Z}_{17}$$ ($$p$$-adic integers).

Is the following strategy correct for $$\mathbb{Z}_{19}$$ (and analogously for $$\mathbb{Z}_{17})$$? Check for all integers $$n\in\{0,\dotsc,19-1=18\}$$ whether $$f(n)\equiv 0\mod 19$$ and $$f'(n)\not\equiv 0\mod 19$$ both hold. Then Hensel's lemma will guarantee for each such $$n$$ that there exists a unique $$b\in\mathbb{Z}_{19}$$ such that $$f(b)=0$$ and $$b\equiv a \mod p$$. Thus, the number of solutions of $$f(x)=0$$ is exactly the number of possible values for $$n$$ that satisfy the two aforementioned equivalences.

• But an integer $n$ with $f(n)\equiv0\pmod{19}$ may also lift to a solution in $\Bbb{Z}_{19}$ even if $f'(n)\not\equiv0\pmod{19}$. Jun 22, 2019 at 18:48
• @Servaes: Do you mean "even if $f'(n) \equiv 0$ (mod $19$)"? Jun 22, 2019 at 22:35
• @TorstenSchoeneberg Oh yes indeed I do! Too late to edit unfortunately. Jun 22, 2019 at 23:00

Your strategy is essentially right, and will work here (you are tacitly using if $$f(n) \not \equiv 0$$ mod $$p$$ for an $$n \in \lbrace 0, 1, ..., p\rbrace$$, then $$f(x) \neq 0$$ for any $$x \equiv n$$ mod $$p$$, and every $$x\in \mathbb Z_p$$ is $$\equiv n$$ for a unique such $$n$$).
As user Servaes points out in a comment, a potentially tricky case is $$f(n) \equiv f'(n) \equiv 0$$ mod $$p$$. Here, everything can happen, i.e. $$f$$ could have no, one, or more roots $$\equiv n$$ in $$\mathbb Z_p$$ (examples: $$p=2$$ and $$f(x) = x^2-2$$, resp. $$x^2$$, resp. $$x^2-1$$).
However, you are lucky since for your $$f$$ we have $$f'(x) \equiv -3 \not \equiv 0$$ mod $$19$$, and $$f'(x) \equiv 19x^{18}-3 \equiv 2x^2-3 \text{ mod } 17,$$ which is easily seen to have no zeroes mod $$17$$ either.