I have this problem: if we have quadratic extension $\;\Bbb Q(\sqrt D)/Q\;$ and $\;D\in \Bbb N\;$ isn't divisible by squares, I know what is the ring of integer elements in extension depending of $\;D\;$ modulo $\;4\;$ , but I read the next: if $\;a+b\sqrt D\;$ is integer, then trace and norm are integers, so $$2a\in \Bbb Z\;,\;\;a^2-Db^2\in \Bbb Z$$
* This is good, but they say now that since $\;D\;$ has no squares then $\;a\in \Bbb Z\iff b\in\Bbb Z\;$ , and I can't understand this part *.
I know that $\;a\;$ must be a half integer, so $\;a=\frac n2\;,\;\;n\in\Bbb Z\;$ , but why $\;D\;$ isn't divisible by square gives us the above equivalence?