Let $r$ be a natural number and $R=\{ m+nr\sqrt{2} \mid m,n \in \Bbb Z \}$. We can show that $R$ is a subring of the ring $\Bbb Q [\sqrt{2}]$.
My questions are as follows:
$(1)$ Suppose that a subring $R$ containing $1$ of the ring $\Bbb Q [\sqrt{2}]$ is a free $\Bbb Z $-module of rank $2$. Prove that there exists a natural number $r$ such that $R=\{ m+nr\sqrt{2} \mid m,n \in \Bbb Z \}$.
If we consider $\Bbb Z [\sqrt{2}]$ instead of $\Bbb Q [\sqrt{2}]$ then the proof is straightforward. Indeed, let $\{r_1,r_2\}$ be a basis of $\Bbb Z $-module $R$. Set $r_1=a_1+b_1\sqrt2,r_2=a_2+b_2\sqrt2$. Set $s:=$gcd$(b_1,b_2)$ then $R=\{ m+ns\sqrt{2} \mid m,n \in \Bbb Z \}$. How can we deal with the problem in general?
$(2)$ Let $a,b$ be natural numbers, $R=\{ m+nr\sqrt{2} \mid m,n \in \Bbb Z \}$ a ring, and $I_{a,b}=\{ ma+n(b+r\sqrt{2}) \mid m,n \in \Bbb Z \}$ a subset of $R$. Prove that $a$ is a divisor of $b^{2}-2r^{2}$ if and only if $I_{a,b}$ is an ideal of $R$.
It's easily seen that $I_{a,b}$ is closed under substraction. Now $I_{a,b}$ is an ideal of $R$ $\iff$ $xs \in I_{a,b}$ for all $x \in R, s\in I_{a,b}$. Write $x=m+nr\sqrt{2}$, $s=pa+q(b+r\sqrt{2})$, $m,n,p,q \in\Bbb Z $. Then $xs=mpa+mqb+2nqr^2+(mq+pna+qbn)r\sqrt2$. I couldn't figure out which conditions that can force $xs \in I_{a,b}$. I may need something like linear independent elements of $I_{a,b}$ over $\Bbb Z $. But I donot know what they really are.
Any help would be much appreciated.
Here is an answer for question 1.
There exists $a+b\sqrt2 \in R$ with $a,b \in \mathbb Z$ and $b\ne0$, because otherwise $R \subseteq \mathbb Q$, which contradicts $R$ having $\mathbb Z$-rank $2$. Since $1 \in R$, we get $b\sqrt2 \in R$ for some $b \in \mathbb N$. Now take $r = \min \{ b \in \mathbb N : b\sqrt2 \in R \}$. Then $b\sqrt2 \in R$ iff $b$ is a multiple of $r$.
Here is a partial answer for question 2.
Suppose $I_{a,b}$ is an ideal of $R$. Then
$b-r\sqrt{2} \in R, \ b+r\sqrt{2} \in I_{a,b}$
$\implies b^2-2r^2=(b-r\sqrt{2})(b+r\sqrt{2}) \in I_{a,b}$
$\implies$ $b^2-2r^2$ is a multiple of $a$