11

Inspired by the last year's "2018 four 4s challenge", I thought it's time to welcome 2019 by a similar challenge. This time you have to use the digits 2, 0, 1, 9 in this particular order to create the numbers 1 - 30.

The rules haven't changed:

  • Use all four digits exactly once in the order 2-0-1-9.
  • Allowed operations: $+, -, \cdot, \div, !$ (factorial), $!!$ (double factorial), square root, exponentiation.
  • Parentheses and grouping (e.g. "19") are also allowed.
  • Squaring uses the digit 2, so expressions using multiple 2's, e. g. $2^2$ or $1^2+2^9$, are not allowed.
  • The modulus operator $(\%, \mod)$ is not allowed.
  • Rounding (e.g. 201/9=22) is not allowed.

I'm curious to see your creative solutions!

May each day of 2019 bring happiness, good cheer, and sweet surprises to you and all your dear ones!

Happy New Year and greetings from Germany! André

NAMELESS
  • 1,370
  • 14
  • 19

4 Answers4

11

$$1=20-19$$ $$2=2+0\cdot 19=20\div(1+9)$$ $$3=2\cdot 0\cdot 1+\sqrt{9}=-(2+0+1)!+9$$ $$4=2^{0-1+\sqrt{9}}$$ $$5=20\div (1+\sqrt{9})$$ $$6=(2\cdot 0\cdot 1+\sqrt{9})!$$ $$7=-2-0\cdot 1+9$$ $$8=2^{0\cdot 1+\sqrt{9}}$$ $$9=2\cdot 0\cdot 1+9$$ $$10=2\cdot 0+1+9=20-1-9$$ $$11=2+0\cdot 1+9=20-1\cdot 9=2^0+1+9$$ $$12=2+0+1+9=20+1-9$$ $$13=2+0!+1+9=2^{0!+1}+9$$ $$14=(2+0!)!-1+9$$ $$15=(2+0+1)!+9$$ $$16=2^{0+1+\sqrt{9}}$$ $$17=20-\sqrt{1\cdot 9}$$ $$18=20+1-\sqrt{9}$$ $$19=2\cdot 0+19$$ $$20=2^0+19$$ $$21=20+1^9$$ $$22=2\cdot (0!+1+9)$$ $$23=20+\sqrt{1\cdot 9}$$ $$24=2^{0-1+\sqrt{9}}!=20+1+\sqrt{9}$$ $$25=(2+0!)!+19$$ $$26=2+0+(1+\sqrt{9})!$$ $$27=(2+0+1)^{\sqrt{9}}$$ $$28=20-1+9$$ $$29=20+1\cdot 9=20\cdot 1+9$$ $$30=20+1+9$$

DONE!

user46002
  • 2,564
  • 1
  • 19
  • 30
7

1

1 = 2^(0*19)

2

2 = 2 + (0*19)

3

3 = 2 + 0!^19

4

4 = 2 ^ (0! + 1 ^ 9)

5

-((2 + 0! + 1) - 9)

6

-((2 + 0 + 1) - 9))

7

-((2 + 0*1 - 9))

8

-((2 - 01) - 9)

9

2*0*1 + 9

10

2*0 + 1 + 9

11

2 + 0*1 + 9

12

2 + 0 + 1 + 9

13

2 + 0! + 1 + 9

14

(2 + 0!)! - 1 + 9

15

(2 + 0 + 1)! + 9

16

(2 + 0!)! + 1 + 9

17

20 - (1 * sqrt(9))

18

(2 + (0 * 1)) * 9

19

20 - 1^9

20

20 * 1^9

21

20 + 1^9

22

2 + 0! + 19

23

20 + 1 * sqrt(9)

24

20 + 1 + sqrt(9)

25

2 || (0! + 1 + sqrt (9))

explained:

Ok, this one needs explanation. The operation for "grouping" is known as concatenation and represented by ||. Basically this means push the digits together: 2 || 0 = 20. However, just like any operation, you can represent either side not by a number but by an equation on its own. So 0! + 1 + sqrt(9) = 5, meaning the above represents 2 || 5, qed.

26

2 || ((0! + 1) * sqrt(9))

27

(2 + 0 + 1) * 9

28

((2 + 0!) || 1) - sqrt(9)

29

(2 + (0 * 1)) || 9

30

20 + 1 + 9

flashstorm
  • 1,142
  • 5
  • 11
5

I wrote a program to determine all representable numbers between 1 and 1,000,000 following the rules, so this should be a comprehensive list.

0 through 30:

$$0 = 2\times0\times\left(1+9\right)$$ $$1 = 20-19$$ $$2 = 2+0\times\left(1+9\right)$$ $$3 = 2+0+1^{9}$$ $$4 = 2-\left(0+1-\sqrt{9}\right)$$ $$5 = \frac{20}{1+\sqrt{9}}$$ $$6 = -2-\left(0+1-9\right)$$ $$7 = 2\times\left(0-1\right)+9$$ $$8 = 2\times0-\left(1-9\right)$$ $$9 = 2\times0+1\times9$$ $$10 = 2-\left(0+1-9\right)$$ $$11 = 2+0+1\times9$$ $$12 = 2+0+1+9$$ $$13 = 20-\left(1+\left(\sqrt{9}\right)!\right)$$ $$14 = 20-1\times\left(\sqrt{9}\right)!$$ $$15 = 20+1-\left(\sqrt{9}\right)!$$ $$16 = 2\times\left(0-\left(1-9\right)\right)$$ $$17 = -2+0+19$$ $$18 = 2\times\left(0+1\times9\right)$$ $$19 = 2\times0+19$$ $$20 = 2\times\left(0+1+9\right)$$ $$21 = 2+0+19$$ $$22 = 20-\left(1-\sqrt{9}\right)$$ $$23 = 20+1\times\sqrt{9}$$ $$24 = 20+1+\sqrt{9}$$ $$25 = 20-\left(1-\left(\sqrt{9}\right)!\right)$$ $$26 = 20+1\times\left(\sqrt{9}\right)!$$ $$27 = \left(2+0+1\right)\times9$$ $$28 = 20-\left(1-9\right)$$ $$29 = 20+1\times9$$ $$30 = 20+1+9$$

31 through 100. Concatenation of expressions (denoted with ||) is only used when necessary. Interestingly enough, 31 is the smallest number that cannot be done without concatenation of expressions, and 75 is the smallest number that cannot be done in general.

$$31 = 2+\left(\left(0!+1\right)||9\right)$$ $$32 = \sqrt{2^{0+1+9}}$$ $$33 = \left(2+0!+1\right)!+9$$ $$34 = \left(2+0!\right)||\left(1+\sqrt{9}\right)$$ $$35 = 20+\left(-1+\left(\sqrt{9}\right)!\right)!!$$ $$36 = 2\times\left(-0!+19\right)$$ $$37 = \left(2+0!\right)||\left(1+\left(\sqrt{9}\right)!\right)$$ $$38 = 2\times\left(0+19\right)$$ $$39 = 20+19$$ $$40 = 20\times\left(-1+\sqrt{9}\right)$$ $$41 = \left(\left(2+0!\right)!\right)!!-\left(1+\left(\sqrt{9}\right)!\right)$$ $$42 = \left(2+0!\right)!\times\left(1+\left(\sqrt{9}\right)!\right)$$ $$43 = \left(\left(2+0!\right)!\right)!!+1-\left(\sqrt{9}\right)!$$ $$44 = 20+\left(1+\sqrt{9}\right)!$$ $$45 = \left(\left(2+0!\right)!-1\right)\times9$$ $$46 = 2\times\left(-0!+\left(1+\sqrt{9}\right)!\right)$$ $$47 = 2\times0-\left(1-\left(\left(\sqrt{9}\right)!\right)!!\right)$$ $$48 = 2\times\left(0+\left(1+\sqrt{9}\right)!\right)$$ $$49 = 2-\left(0+1-\left(\left(\sqrt{9}\right)!\right)!!\right)$$ $$50 = 2\times\left(0!+\left(1+\sqrt{9}\right)!\right)$$ $$51 = 2+0+1+\left(\left(\sqrt{9}\right)!\right)!!$$ $$52 = 2+0!+1+\left(\left(\sqrt{9}\right)!\right)!!$$ $$53 = \left(2+0!\right)!-\left(1-\left(\left(\sqrt{9}\right)!\right)!!\right)$$ $$54 = \left(2+0!\right)!\times1\times9$$ $$55 = \left(2+0!\right)!+1+\left(\left(\sqrt{9}\right)!\right)!!$$ $$56 = \left(\left(2+0!\right)!\right)!!-\left(1-9\right)$$ $$57 = \left(20-1\right)\times\sqrt{9}$$ $$58 = \left(\left(2+0!\right)!\right)!!+1+9$$ $$59 = \left(\left(2+0!\right)!-1\right)||9$$ $$60 = 20\times1\times\sqrt{9}$$ $$61 = \left(2+0!\right)!||\left(1^{9}\right)$$ $$62 = -2+\left(0!+1\right)^{\left(\sqrt{9}\right)!}$$ $$63 = \left(20+1\right)\times\sqrt{9}$$ $$64 = 2^{0+1\times\left(\sqrt{9}\right)!}$$ $$65 = \left(2+0!\right)!||\left(-1+\left(\sqrt{9}\right)!\right)$$ $$66 = 2+\left(0!+1\right)^{\left(\sqrt{9}\right)!}$$ $$67 = \frac{201}{\sqrt{9}}$$ $$68 = 20+1\times\left(\left(\sqrt{9}\right)!\right)!!$$ $$69 = -2+\sqrt{0!+\left(1+\left(\sqrt{9}\right)!\right)!}$$ $$70 = \left(\left(2+0!\right)!||1\right)+9$$ $$71 = \sqrt{2^{0}+\left(1+\left(\sqrt{9}\right)!\right)!}$$ $$72 = \left(2+0!\right)\times\left(1+\sqrt{9}\right)!$$ $$73 = 2+\sqrt{0!+\left(1+\left(\sqrt{9}\right)!\right)!}$$ $$74 = 2\times\left(\left(-0!||1\right)+\left(\left(\sqrt{9}\right)!\right)!!\right)$$ $$76 = \left(\left(2+0!\right)!+1\right)||\left(\sqrt{9}\right)!$$ $$78 = \left(2+0!\right)!\times\left(1||\sqrt{9}\right)$$ $$79 = \left(\left(2+0!\right)!+1\right)||9$$ $$80 = 20\times\left(1+\sqrt{9}\right)$$ $$81 = \left(2+0!\right)^{1+\sqrt{9}}$$ $$83 = \left(2+0!+1\right)!!||\sqrt{9}$$ $$84 = \left(2||0!\right)\times\left(1+\sqrt{9}\right)$$ $$85 = -20+\left(1+\left(\sqrt{9}\right)!\right)!!$$ $$86 = \left(2+0!+1\right)!!||\left(\sqrt{9}\right)!$$ $$89 = \left(2+0!+1\right)!!||9$$ $$90 = \frac{\left(\left(2+0!\right)!\right)!}{-1+9}$$ $$92 = 2\times\left(-0!-\left(1-\left(\left(\sqrt{9}\right)!\right)!!\right)\right)$$ $$93 = \left(\left(2+0!\right)||1\right)\times\sqrt{9}$$ $$94 = 2\times\left(0-\left(1-\left(\left(\sqrt{9}\right)!\right)!!\right)\right)$$ $$95 = \left(\left(2+0!\right)!\right)!!-\left(1-\left(\left(\sqrt{9}\right)!\right)!!\right)$$ $$96 = 2\times\left(0+1\times\left(\left(\sqrt{9}\right)!\right)!!\right)$$ $$97 = \left(\left(2+0!\right)!\right)!!+1+\left(\left(\sqrt{9}\right)!\right)!!$$ $$98 = 2\times\left(0+1+\left(\left(\sqrt{9}\right)!\right)!!\right)$$ $$99 = \left(\left(2+0!\right)!+1\right)!!-\left(\sqrt{9}\right)!$$ $$100 = 20\times\left(-1+\left(\sqrt{9}\right)!\right)$$

The rest of the numbers from 101 to 1,000,000 can be found here.

The Turtle
  • 151
  • 4
  • Nice. I'm curious whether your program finds anything for 28 other than $20 - (1-9)$ and $20 - 1 +9$, etc. –  Jan 02 '19 at 13:37
4

1-16 were done as of the time I started this, so I wanted to focus only on 17-30, using answers different from ones that I've already seen. Others will be included if I find solutions that I like.

8:

$8 = \sqrt{(2^{0!+1}!!)!! / (\sqrt9)!}$

16:

$16 = ((2 + 0 + 1)!)!! / \sqrt9 = 20 - 1 - \sqrt9$

17:

$17 = (2 + 0! + 1)!! + 9$

18:

$18 = (2^0 + 1) \cdot 9 = 2 \cdot (0+1)\cdot 9 = 2^{0+1} \cdot 9$

19:

$19 = 2 \cdot 0 + 19$

20:

$20 = 2^0 + 19 = 20! / 19!$

21:

$21 = 20 + 1^9$

22:

$22 = 20 - 1 + \sqrt9$

23:

$23 = 20 + 1 \cdot \sqrt9$

24:

$24 = 2^{0! + 1} \cdot (\sqrt9)! = 2^{0! + 1}!! \cdot \sqrt9 = (2+0!+1)!! \cdot \sqrt9 = ((2 + 0!)! - 1)!! + 9$

25:

$25 = (2 + 0!)! + 19$

26:

$26 = 20 + 1 \cdot (\sqrt9)!$

27:

$27 = 2^{0! + 1}! + \sqrt9$

28: Can't get one different from what I've already seen in other answers. Will maybe try later.

29:

$29 = 20 + 1 \cdot 9$

30:

$30 = 2^{0! + 1}! + (\sqrt9)!$

I know we're supposed to stop at 30, but I accidentally found this fun one:

32:

$32 = \sqrt{20!! / (1 + 9)!}$