Mathematical conjectures equivalent to the halting of a Turing machine
Your question is answered by the arithmetical hierarchy. The existence of an odd perfect number is a $\Sigma_1$ statement, and so you can test it using a $\Sigma_1$ machine, which halts iff the statement is true. The twin prime conjecture is a $\Pi_2$ statement, and so you can construct a TM with access to the halting oracle which halts iff the statement is false.
In a strict logical sense, you can always make a Turing machine that halts iff statement $\phi$ holds:

If $\phi$ holds, then take a machine which halts.
If $\phi$ doesn't hold, then take a machine which doesn't halt.

To see that this construction is valid, consider the logical form of your statement:
$$ \forall \phi \exists T . \phi \Leftrightarrow T\text{ halts}. $$
You can clear this confusion up by asking a slightly different questions:

What is a set of statements $\Phi$ such that there exists a Turing machine which halts on $\phi \in \Phi$ iff $\phi$ is valid?

Above I have indicated that $\Sigma_1$ statements form such a set.