# Obtain numbers from 0 to 9 with the digits of 2022 in that order

The title says (nearly) all. Write the digits $$2$$ $$0$$ $$2$$ $$2$$ in that order and apply mathematical operators to obtain all values from 0 to 9. What's allowed:

• The four basic operators, $$+ - * /$$
• Parenthesis to force the order of operations
• Power (like $$2^0$$)
• Factorial (like $$2!$$)
• Concatenation (like $$202$$)
• Square root ($$\sqrt {}$$)
• Digital point (with or without leading 0, like $$2.02$$ or $$.2$$)
• Periodic numbers (like $$.\overline{2}$$)

I did not need to use truncation.

• You are about two months early.
– Bass
Nov 1, 2021 at 17:01
• @Bass: I am letting people prepare in advance for puzzles for New Year's Eve
– mau
Nov 1, 2021 at 17:19
• Future Shock Syndrome...
– smci
Nov 2, 2021 at 22:03

0: 2*0*22
1: 2*0+(2/2)
2: 2+0+2-2
3: 2+0+(2/2)
4: 2*0+2+2
5: 2^0+2+2
6: 2+0+2+2
7: 2+0!+2+2
8: (2+0)*2*2
9: (2^0+2)^2  

Since

2x0=0, we can add zero to 2-2=0, 2/2=1, sqrt(2x2)=2, sqrt(2/.2rec)=3, 2x2=4, 2/.2rec=9 to get 0,1,2,3,4,9.

Since

2-0!=1 and 2-0=2, we can add 1 or 2 instead of 0, or (-2+0+ etc.) subtract instead of adding, getting 5,6 as 1+4,2+4 and 8,7 as 9-1,9-2.

And we're done.

Alternate solutions. Mostly.

$$0 = 2 \times 0 \times 2 \times 2$$
$$1 = 2 + 0 - 2/2$$
$$2 = 2 + 0 \times 2/2$$
$$3 = 2 + 0 + 2 / 2$$
$$4 = 2 \times 0 + 2 \times 2$$
$$5 = 20/2/2$$
$$6 = 2 + 0 + 2 + 2$$
$$7 = 2/0.\overline{2} - 2$$
$$8 = 20/2 - 2$$
$$9 = (20 - 2)/2$$

• I completely missed the solution for 9... My own solution was $20/2.\overline{2}$
– mau
Nov 1, 2021 at 18:01

A bit late but:

$$2×0+2-2=0$$
$$2×0+2/2=1$$
$$2+0+2-2=2$$
$$2+0+2/2=3$$
$$2×0+2+2=4$$
$$2^0+2+2=5$$
$$2+0+2+2=6$$
$$-2+0+2/.\overline{2}=7$$
$$2×(0+2+2)=8$$
$$2×0+2/.\overline{2}=9$$

• Very simple and elegant, esp. 7 and 9. If we assign points for using the more advanced, this would win. Btw. in 7 you used unary minus which the rules didn't spell out was allowed.
– smci
Nov 5, 2021 at 0:18