Determine all of the prime numbers $\,\,p\,\,\,$ s.t. $\,\,\,2 \le p \le 50\,\,\,$s.t. the following congruence has solutions $\forall x \in \mathbb{Z}$
$$3x^p+px^3\equiv \,\,0\,\, (\text{mod} \,\, 5)$$
I am bogged down with this exercise, any hint? Maybe the little Fermat's theorem (?) on $x(3x^{p-1}+px^2)\equiv \,\,0\,\, (\text{mod} \,\, 5)$.
As lulu says, the equation
$$3x^p + px^3 \equiv 0 \pmod 5 \tag{1}\label{eq1}$$
is always true when $x \equiv 0 \pmod 5$, so it doesn't do anything to limit which possible values to check. Next, try $x \equiv 1 \pmod 5$. This gives
$$3 + p \equiv 0 \pmod 5 \Rightarrow p \equiv 2 \pmod 5 \tag{2}\label{eq2}$$
Within your provided range, this means that the only possible choices are
$$p = 2, 7, 17, 37, 47 \tag{3}\label{eq3}$$
Next, consider $x \equiv 4 \equiv -1 \pmod 5$. For $p = 2$, this gives
$$3 - 2 \equiv 1 \pmod 5 \tag{4}\label{eq4}$$
However, for any odd $p$, \eqref{eq1} becomes
$$-3 - p \equiv -5 \equiv 0 \pmod 5 \tag{5}\label{eq5}$$
Thus, it'll always work then. This leaves just checking $2$ and $3$. For $x \equiv 2 \pmod 5$, we get
$$3 \times 2^p + \left(5 + 3\right)p \equiv 0 \Rightarrow 2^p + p \equiv 0 \pmod 5 \tag{6}\label{eq6}$$
As $p \equiv 2 \pmod 5$, \eqref{eq6} becomes
$$2^p \equiv 3 \pmod 5 \tag{7}\label{eq7}$$
This is true iff $p \equiv 3 \pmod 4$. Among the remaining values in \eqref{eq3} for $p$, this leaves just $p = 7, 47$. Finally, for checking $x \equiv 3$, note that $3 \equiv -2 \pmod 5$. As the powers of $x$ in \eqref{eq1} are odd (i.e., $p$ and $3$), this means the resulting value would be the negative of that obtained for $x \equiv 2 \pmod 5$, so the same values of $p$ will work with it as well.
In summary, the only values of $p$ which work are $7$ and $47$.