Let $G$ be the multiplicative group $(\mathbb{R}_+,\cdot)$, which is the positive real numbers equipped with the usual distance. Let $P$ be the subgroup of $G$ generated by $2,3,5,7$, i.e. $$P = \bigcup\limits_{n=1}^\infty\{2,3,5,7,\frac12,\frac13,\frac15\frac17\}^n$$ I have a few questions.
- Is the subgroup $P$ dense in $(\mathbb{R}_+,\cdot)$?
- What is the best approximation of $\sqrt2$ or $\pi$ in $P$ given the constraint that, for example, the total number of primes used is less than $1000$? I'm allowed only to use $2,3,5,7$ and no more.
I know that a nontrivial additive subgroup of $(\mathbb R,+)$ is either dense or discrete, so we can transform $2,3,5,7$ into $\log 2,\log3,\log5,\log7$ and consider the subgroup of $(\mathbb R,+)$ generated by $\log 2,\log3,\log5,\log7$, which I believe is dense. Then we can approximate $\log \sqrt2=\frac12\log2$ by an integer combination of these elements.
However, I've done some simulations and the best approximation I can find is $\frac{7^3}{3^5}\approx 1.411522633744856$, which makes me suspect it is not dense. Where did I go wrong? Does there exist an algorithm for finding such combinations?
Edit: I just found out that $\sqrt2$ is a very special case because $\log\sqrt2=\frac12\log2$. What if I want to approximate $\pi$? I used @lulu's method and got $$3^a=2^b\pi\implies a\log3=b\log2+\log\pi\implies \frac{a}{b+\frac{\log\pi}{\log2}}=\frac{\log2}{\log3}$$
Or I want to use all of $2,3,5,7$.$$2^a3^b5^c7^d=\sqrt2$$ $$a\log2+b\log3+c\log5+d\log7=\frac12\log2$$ $$2b\log3+2c\log5+2d\log7=(1-2a)\log2$$ $$\frac{2b+2\frac{\log5}{\log3}c+2\frac{\log7}{\log3}d}{1-2a}=\frac{\log2}{\log3}$$ but I couldn't proceed.
Q1: Yes, this subgroup is dense, and in fact any two distinct primes would suffice. Here are two general claims.
Claim 1 follows from Dirichlet's approximation theorem and Claim 2 has a very short proof as follows: if $\frac{\log p}{\log q} = \frac{a}{b}$ where $a, b \in \mathbb{N}$ then we would have $p = q^{\frac{a}{b}}$ and hence $p^b = q^a$ but this contradicts unique prime factorization. (It is harder but still true that $\frac{\log p}{\log q}$ is transcendental; this follows from the Gelfond-Schneider theorem.)
I don't have any insight into Q2 beyond what lulu says in the comments about continued fractions but maybe integer relation algorithms could be helpful.