4. Find all pairs of prime numbers $(p, q)$ for which

$$
7 p q^{2}+p=q^{3}+43 p^{3}+1 .
$$
4. First, let's show that in the equation $7 p q^{2}+p=q^{3}+43 p^{3}+1$, the numbers $p$ and $q$ cannot both be odd. In that case, $7 p q^{2}+p$ would be even, while $q^{3}+43 p^{3}+1$ would be odd. Therefore, $p=2$ or $q=2$, because 2 is the only even prime number.

In the case that $p=2$, we get the equation $14 q^{2}+2=q^{3}+344+1$, or $q^{3}-14 q^{2}=-343$. We see that $q$ must be a divisor of $343=7^{3}$, and thus $q=7$. Substituting gives that $(p, q)=(2,7)$ indeed satisfies the equation, since $14 q^{2}+2=2 \cdot 7 \cdot 7^{2}+2$ and $q^{3}+344+1=7^{3}+\left(7^{3}+1\right)+1=2 \cdot 7^{3}+2$ are equal.

Now let's consider the case $q=2$ and $p$ odd. The equation for $p$ then becomes $28 p+p=8+43 p^{3}+1$. Since $28 p+p$ is odd and $8+43 p^{3}+1$ is even, there are no solutions in this case.

The only solution is thus $(p, q)=(2,7)$.