Subrings of $\mathbb{Q}$

Let $p$ be prime. Suppose $R$ is the set of all rational numbers of the form $\frac{m}{n}$ where $m,n$ are integers and $p$ does not divide $n$.

Clearly then $R$ is a subring of $\mathbb{Q}$.

I now want to show that if $\frac{m}{n}$ belongs to any proper ideal of $R$ then $p|m$.

Can someone point me in the right direction.


Solutions Collecting From Web of "Subrings of $\mathbb{Q}$"

HINT: If $p\nmid m$, then $\frac{n}m\in R$.

Hint: If $p$ doesn’t divide $m$, can you show that $m/n$ is a unit?

Hint: What happens if you assume that $m$ is divisible by $p$?

You can view $R$ as the localization of the ring of integers outside $p$, meaning
$$R=\mathbb{Z}_{S}=\{\frac{m}{m}:m\in\mathbb{Z},n\in S\}$$
where $S\subseteq\mathbb{Z}$ is the multiplicative subset of $\mathbb{Z}$ given by $S:=\mathbb{Z}\setminus p\mathbb{Z}$.

Now, $\mathbb{Z}$ is a Dedekind domain (it is a PID), hence every localization of $\mathbb{Z}$ outside a prime $p$ is a DVR, meaning a PID and local (i.e only one maximal ideal). If $\frac{m}{n}$ belongs to a proper ideal of $R$, then it is contained in a maximal ideal of $R$. But $R$ is local and its unique maximal ideal is $p\mathbb{Z}_S$, which is the set of fractions $\frac{a}{b}$ with $a\in p\mathbb{Z}$ and $b\notin p\mathbb{Z}$. Thus $\frac{m}{n}$ belongs to $p\mathbb{Z}_S$, implying $m\in p\mathbb{Z}$.