Consider the set $S= ${$r_1, r_2, ..., r_k$} where $r_1,...,r_k\in\mathbb{Q}$. Is there an explicit formula for always finding a rational number outside all integer linear combinations of elements of $S$?
My thoughts: Yes, since $S$ is finite, its integer linear combinations cannot possibly encompass all of $\mathbb{Q}$. As for an explicit formula: am I on the right track thinking that it will depend on all $r_1,...,r_k$? That is, if $a\in\mathbb{Q}$ such that $a\neq n_1r_1+...+n_kr_k$ for any $n_1,...,n_k\in\mathbb{Z}$, then $a=f(r_1,...,r_k)$. How might I go about about finding this formula?
Edit: No one as of yet has been able to answer this, but I've had some more thoughts since then. What if we let $d_{i,j}$ be the absolute value of the difference between any two elements $r_i$ and $r_j$. Then, let $d_{m,k}=$min{$d_{i,j}, |r_l|$} $\forall i,j,l$. Then, $a=\frac{r_m+r_k}{2}$ or $a=\frac{r_l}{2}$ as appropriate is a suitable choice for $a$ as above.
There is a simple solution. Let $t$ be the least common multiple of denominators of the rationals. Let $m$ be an non-zero integer such that $t$ is not a multiple of $m$. $\frac{1}{m}$ is one number not an integer linear combination of those rationals.
If you want an explicit formula, say $m=q_1\cdot q_2\cdots q_n + 1$, where $r_i=\frac{p_i}{q_i}$ and $q_i>0$