Fixed: Is this set empty? $ S = \{ x \in \mathbb{Z} \mid \sqrt{x} \in \mathbb{Q}, \sqrt{x} \notin \mathbb{Z}, x \notin \mathbb{P}$ } This question has been "fixed" to reflect the question that I intended to ask
Is this set empty? $ S = \{ x \in \mathbb{Z} \mid \sqrt{x} \in \mathbb{Q}, \sqrt{x} \notin \mathbb{Z}, x \notin \mathbb{P}$ }
Is there a integer, $x$, that is not prime and has a root that is not irrational?
 A: Edited in response to the latest change to the question
The answer is ‘no’. As you are considering $ \sqrt{x} $, we must look at $ x \geq 0 $.
Suppose that $ \sqrt{x} \in \mathbb{Q} \setminus \mathbb{Z} $. Let $ \sqrt{x} = \dfrac{p}{q} $, where $ p \in \mathbb{N}_{0} $, $ q \in \mathbb{N} $ and $ \gcd(p,q) = 1 $. This yields
$$
q^{2} x = p^{2}.
$$
By way of contradiction, assume that $ x $ is an integer. Then by the identity above, $ q $ must divide $ p^{2} $. However, $ \gcd(p,q) = 1 $, so this means that $ q = 1 $. Hence, $ \sqrt{x} = p $, which is a contradiction because we started our argument with $ \sqrt{x} \in \mathbb{Q} \setminus \mathbb{Z} $.
Conclusion: $ S = \varnothing $.
A: If you see it this way: $S=\{x^2|x\in Q,x\not\in Z\}$, then every a²/b² is valid where b doesn't divide a.
A: To answer according to the last edit: Yes.
Let $a\in\mathbb{Z}$ and consider the polynomial $x^{2}-a$. 
By the rational root theorm if there is a rational root $\frac{r}{s}$
then $s|1$ hence $s=\pm1$ and the root is an integer. So $\sqrt{a}\in\mathbb{Q}\iff\sqrt{a}\in\mathbb{Z}$ .
Since you assumed that the root is not an integer but is a rational number this can not be.
