Number of maximal ideals of a subring of $\mathbb{Q}$ Let $t \in \mathbb{N}$ and let $p_1,p_2,..., p_t$ be $t$ distinct prime numbers. Show that
$R=\{a\in \mathbb{Q} : a=\frac{m}{n} $ for some $m \in \mathbb{Z} \text{ and } n\in \mathbb{N}$ such that $n$ is divisible by none of $p_1,...., p_t \}$
is a subring of $\mathbb{Q}$ which has exactly $t$ maximal ideals.
I have easily shown $R$ is subring, but did not find the number of maximal ideals.
 A: Localization answer: Set $P_i:=\langle p_i\rangle$ for each $i$ ( the ideal generated by $p_i$ in $\mathbb{Z}$) and set $S:=\mathbb{Z}\setminus\bigcup_iP_i$. Clearly $S$ is a multiplicatively closed subset of $\mathbb{Z}$ and $R=\{a\in \mathbb{Q} : a=\frac{m}{n} $ for some $m \in \mathbb{Z} \text{ and } n\in \mathbb{N}$ such that $n$ is divisible by none of $p_1,...., p_t \}=S^{-1}\mathbb Z$.
Now since $\mathrm{Spec}(S^{-1}\mathbb{Z})=\{S^{-1}P\mid P\bigcap S=\varnothing\}\bigcup\{0\}=\{S^{-1}P_1,..., S^{-1}P_t\}\bigcup\{0\}$, we have $\mathrm{Max}(S^{-1}\mathbb{Z})=\{S^{-1}P\mid P\bigcap S=\varnothing\}=\{S^{-1}P_1,..., S^{-1}P_t\}$.
Another elementary answer: For each $i$, set $Q_i:=\{a\in \mathbb{Q} : a=\frac{m}{n} $ for some $m \in \mathbb{Z}\text{ and } n\in \mathbb{N}$ such that $ n$ is divisible by none of $p_1,...., p_t$ and  $p_i$ divides $ m\}$. An easy argument shows that $Q_i$'s are distinct maximal ideals of $R$ and every proper ideal of $R$ is contained in one of them. Hence, $\mathrm{Max}(R)=\{Q_1,..., Q_t\}.$
