How can I write that the lone prime number that is followed by a perfect cube is seven in predicate logic? I have a general idea of how to prove this statement, but I'm having trouble translating the statement to predicate logic. My attempt is as follows:
$P(x): x$ is prime
$\forall m \in \mathbb{N}, \exists x \in \mathbb{N}, x = m^3 -1 \land P(x) \Rightarrow x = 7 $
 A: Adrian is right that the $\exists$ should be a $\forall$. Why? Because otherwise, we can make the conditional vacuously true simply by pointing to any $x$ for which the antecedent is false, and thus the statement would be true without saying anything interesting about any numbers that do have the property of being one less than a perfect cube. Indeed, note what I used there: 'any'!  That is, it is true that for any number whose successor is a perfect cube, that number will have to be $7$, and so we really need to use a universal quantifier, i.e.:
$\forall m \in \mathbb{N}, \forall x \in \mathbb{N}, ((x = m^3 -1 \land P(x)) \Rightarrow x = 7)$
or, what is the equivalent:
$\forall x \in \mathbb{N}, (\exists m \in \mathbb{N}, (x = m^3 -1 \land P(x)) \Rightarrow x = 7)$
I am wondering if maybe you used $\exists \ x$ because when translating 'there is only ...' or 'there is a unique ...' you are typically not told what this special something is, and hence you do need to introduce an existential. That is, if the sentence was: 'There is only one number whose successor is a perfect cube', you'd do:
$\exists y \in \mathbb{N}, \forall x \in \mathbb{N}, (\exists m \in \mathbb{N}, (x = m^3 -1 \land P(x)) \Rightarrow x = y)$
But in this case we know what this 'special something' is: it is $7$, and so we don't need the $\exists$.  But, we do need the $\forall$ in order to rule out any numbers other than $7$ to have the property in question.
However, notice that we actually want to do something more than ruling out anything other than $7$ to have this property. You also want to say that $7$ actually has this property. That is, the way the statement is now, we don;t know whether $7$ has the property or not, but the statement clearly suggests that it does.  So, I would do:
$\forall x \in \mathbb{N}, (\exists m \in \mathbb{N}, (x = m^3 -1 \land P(x)) \Leftrightarrow x = 7)$
