I'm trying to figure out how to formulate the Twin Prime Conjecture as a language recognition problem. I've got:
A = {p: p is the largest prime such that p + 2 is prime}
B = {p: p and p+2 are both prime}
I believe A is the correct (but not the only) formulation and that A is not decidable while B is. Is my understanding correct?
The property $p\in B$ is decidable, just run a Turing machine which tests $p$ and $p+2$ for being prime numbers. This machine will definitely give you a result (either way) and thus decide whether $p\in B$ or $p\notin B$.
For the other set $A$:
If there are infinitely many twin primes, then $A$ would be empty by definition (i.e. there is no largest twin). If there are only finitely many twin primes, then $A$ would be a singleton, containing the smaller number in the biggest twin primes pair. By definition the empty set and a particular singleton (any finite set) are decidable, i.e. there are Turing machines which can decide (case by case) if an object is in an explicitly given finite set or not.
The problem here is that your definition of $A$ relies on a possibly undecidable property (i.e. it could be that the twin primes problem itself is undecidable), hence the two cases of whether $A$ is empty or a singleton would not be decidable. But even if the twin problem were decidable, it could be decidable in a non-constructive fashion, meaning that the biggest twin prime would not be given explicitly (and neither would there be an upper bound on the biggest twin prime) and then the unique element in the set $A$ would not be known (or computable from the knowledge about the cardinality of existing twin primes alone).