$R=\{a/b: a,b \in \mathbb{Z}$ and $b$ is odd}. Show that the ring $R$ is a PID. 
Let us have a ring $R$ defined as $R=\{a/b: a,b \in \mathbb{Z}$ and $b$ is odd}. I want to show that $R$ is a PID.

I think I should start with that $I\cap Z = n \mathbb{Z}$ for some $n \in \mathbb{Z}$. This implies that $nR \subseteq I$. Now I need to show that $I \subseteq nR$ and I'm not sure how to do this. Any help would be great. 
 A: The ring of integers $\Bbb Z$ is a PID. Your ring is the localization of $\Bbb Z$ at the prime ideal $(2)$, so it suffices you show the localization of a PID is a PID. But if $R$ is a commutative ring and $S$ a multiplicative subset, the ideals of $S^{-1}R$ are in bijection with the ideals of $R$ that do not meet $S$, and the bijection sends an ideal $I\subseteq R$ to the ideal $S^{-1}I=\{a/s:a\in I,s\in S\}$. In particular, if $I=(r)$, then $S^{-1}I$ is also generated by $r=r/1$ in $S^{-1}R$, for $$S^{-1}I=\{a/s:a\in I,s\in S\}=\{a'r/s,a'\in R,s\in S\}=\{ br:b\in S^{-1}R\}=(r)$$
In a more pedestrian way, you can note that if $I$ is a proper ideal in your ring $R$, then no element of $I$ can have an odd number in the numerator, for then $1\in I$ and $I$ is not proper. Thus for every proper ideal of $R$ you can pick a least $n$ such that an element of the form $2^nk/b$, $k,b$ odd lies in $I$. Prove then that $I$ is generated by $2^n$, so it is principal. More generally, if you take $\Bbb Z$ and a prime $p$ and consider the subring of $\Bbb Q$ obtained by declaring every element not divisible by $p$ is invertible, you obtain a ring $R$ usually denoted by $\Bbb Z_{(p)}$, and you can show by the same method above the ideals of $R$ are precisely $(p)\supseteq (p^2)\supseteq (p^3)\supseteq \cdots$, so that $R$ is a local ring, i.e. a ring with a unique maximal ideal, $(p)$. 
A: Hint:
What are the non-invertible elements in $R$?
