Problem

Source: Turkey JBMO TST 2016 P7

Tags: number theory, prime numbers



Find all pairs $(p, q)$ of prime numbers satisfying \[ p^3+7q=q^9+5p^2+18p. \]