The Complexity of Primes in Computable UFDs
  In many simple integral domains, such as $\mathbb{Z}$ or $\mathbb{Z}[i]$, there is a straightforward procedure to determine if an element is prime by simply reducing to a direct check of finitely many potential divisors. Despite the fact that such a naive approach does not immediately translate to integral domains like $\mathbb{Z}[x]$ or the ring of integers in an algebraic number field, there still exist computational procedures that work to determine the prime elements in these cases. In contrast, we will show how to computably extend $\mathbb{Z}$ in such a way that we can control the ordinary integer primes in any $\Pi_2^0$ way, all while maintaining unique factorization. As a corollary, we establish the existence of a computable UFD such that the set of primes is $\Pi_2^0$-complete in every computable presentation. 
Damir D. Dzhafarov and Joseph R. Mileti
math.LO math.AC