How can I write the numbers 5 and 7 as some sequence of operations on three 9s?

I want to make the numbers $1, 2, ..., 9$ using exactly three copies of the number $9$ and the following actions: addition, subtraction, multiplication, division, squaring, taking square roots, and other action.

How can we make the numbers $5$ or $7$?

For example, we can make the below numbers using exactly three copies of the number 9.

  • $1=\dfrac{\sqrt 9\times\sqrt9}{9}$
  • $2=\dfrac{9+9}{9}$
  • $3=\dfrac{\sqrt9\times9}{9}$
  • $4=\dfrac{9}{9}+\sqrt9$
  • $5=\,?$
  • $6=\dfrac{9+9}{\sqrt9}$
  • $7=\,?$
  • $8=9-\dfrac{9}{9}$
  • $9=9+9-9.$

Now, how can we make the numbers 5 and 7?


$$5=\sqrt{9}! - \frac{9}{9}, \quad 7=\sqrt{9}! + \frac{9}{9}$$


Since the question did not say the number of actions must be finite,

$${\sqrt{\sqrt{\sqrt{...\sqrt9}}}}=1$$

Then $5=1+1+3$, $7=1+3+3$.


$$5=\log_{\sqrt9}9+\sqrt9,\qquad7=9-\log_{\sqrt9}9.$$


Just do a handstand and read:$$\frac{9}{9}\mp9$$


A couple in the classic vein for these, both taking stealthy advantage of being base-10: $\displaystyle 5=\frac{9}{.9+.9}$ and $\displaystyle 7=\frac{9}{.9}-\sqrt{9}$.