Every finitely generated unitary subring of $\mathbb{Q}$ is of the form $\mathbb{Z}[1/n]$ Let $X \subset \mathbb{Q}$ be finite. I have to show that $\exists n \in \mathbb{N}_0$ s.t. the smallest subring of $\mathbb{Q}$ that contains $X$ is exactly the smallest subring that contains $\mathbb{Z}$ and $1/n$, i.e. $\mathbb{Z}[1/n]$.
So let $X=\{\frac{p_1}{q_1}, \frac{p_2}{q_2}, \dots, \frac{p_k}{q_k} \}$, I tried to prove that I can take $n$ to be the least common multiple of $\{q_1, q_2, \dots, q_k \}$, and I think that it suffices to show: $\mathbb{Z}[\frac{p_1}{q_1}, \frac{p_2}{q_2}, \dots, \frac{p_k}{q_k}]=\mathbb{Z}[1/n]$. One inclusion is easy because:
$$
\forall i: \frac{p_i}{q_i}=\frac{p_in}{q_i}\frac{1}{n}
$$
And since $\frac{p_in}{q_i} \in \mathbb{Z}$ this implies $\mathbb{Z}[\frac{p_1}{q_1}, \frac{p_2}{q_2}, \dots, \frac{p_k}{q_k}]\subseteq\mathbb{Z}[1/n] $.
For the other inclusion I would have to show that there exist $a_i \in \mathbb{Z}$ and $m_{i,j}\in \mathbb{N}_0$, s.t.:
$$
\frac{1}{n}=\sum_{i=1}^{\infty} \left( a_i \prod_{j=1}^{k} \left( \frac{p_i}{q_i} \right)^{m_{i,j}} \right)
$$
(With almost all $a_i=0$)
I think I was able to show this, but it was a giant mess, so I’d be really greatfull If someone could show me a better way to prove the equation above or the general statement. Thank you!
 A: Here an answer I found based on the hints in the comments, it’s still messy but better than before:
First I’ll show for $\frac{p}{q} \in \mathbb{Z}[X]$, also $\frac{1}{q} \in \mathbb{Z}[X]$:
For $\frac{p}{q}$ I can assume that $p, q$ have no common divisors but $1$. I know that $\forall j \in \mathbb{N}: \frac{q-j p}{q} \in \mathbb{Z}[X]$. Thus $\frac{q \mod p}{q} \in \mathbb{Z}[X]$. I define $(q \mod p) =: a_1$. Now $a_1$ can’t devide both $p,q$ unless it is $1$, but then we would be done, so $a_1 \neq 1$. I define:
$$
f(a):= \begin{cases} p, \quad a \nmid p \\ q, \quad a \nmid q \end{cases}
$$
I now define recursively $a_{i+1}:= (f(a_i) \mod a_i)$, and notice that $a_{i+1} < a_i$, since this sequence is decreasing and bounded by $0$ from below it must reach $1$. And since $\forall i: \frac{a_i}{q} \in \mathbb{Z}[X]$, we have $\frac{1}{q} \in \mathbb{Z}[X]$.
Now for $\frac{1}{q_1},\frac{1}{q_2} \in \mathbb{Z}[X]$
$$
\forall \alpha,\beta \in \mathbb{Z}:\frac{1}{q_1} \alpha +\frac{1}\beta{q_2}=\frac{\alpha \operatorname{lcm}(q_1,q_2)/q_1+ \beta\operatorname{lcm}(q_1,q_2)/q_2}{\operatorname{lcm}(q_1,q_2)} \in \mathbb{Z}[X]
$$
And since $\operatorname{lcm}(q_1,q_2)/q_1$ and $\operatorname{lcm}(q_1,q_2)/q_2$ share no common divisors we can choose $\alpha, \beta$ so that (see: $\operatorname{gcd(a,b)=1}\Rightarrow ma+nb=1$):
$$
\frac{\alpha \operatorname{lcm}(q_1,q_2)/q_1+ \beta\operatorname{lcm}(q_1,q_2)/q_2}{\operatorname{lcm}(q_1,q_2)}
=
\frac{1}{\operatorname{lcm}(q_1,q_2)} \in \mathbb{Z}[X]
$$
(If $\exists a \in \mathbb{Z}: a \mid \operatorname{lcm}(q_1,q_2)/q_1  \wedge a \mid \operatorname{lcm}(q_1,q_2)/q_2$ then $\operatorname{lcm}(q_1,q_2)/a$ would be a lesser least common multiple, which would be a contradiction)
The general result then follows by induction because $\operatorname{lcm}(q_1,q_2,q_3)= \operatorname{lcm}(\operatorname{lcm}(q_1,q_2),q_3) $
A: Your subring $R$ is generated by finitely many $u_i/v_i$ with $\gcd(u_i,v_i)=1$. Let $m_i$ be such that $u_i^{m_i}\equiv 1\bmod v_i$. Then $$\frac1{v_i} = v_i^{m_i-1} (u_i/v_i)^{m_i}-\lfloor u_i^{m_i}/v_i\rfloor$$
So the $\frac1{v_i}$ are in $R$ which means that $$R=\Bbb{Z}[\prod_i \frac1{v_i}]$$
