# Make numbers 1 - 32 using the digits 2, 0, 1, 7

This is similar to the "Four fours" puzzle, but using the digits 2, 0, 1 and 7.

Rules:

• Use all four digits exactly once
• Allowed operations: +, -, x, ÷, ! (factorial), exponentiation, square root
• Parentheses and grouping (e.g. "21") are also allowed
• Squaring uses the digit 2 so expressions using multiple twos, like $2^2$ or $1^2 + 7^2$, are not allowed
• Keep the order "2017" in at least 16 expressions (and more if you can!)

Good luck and Happy New Year!

Similar question for 2016

• is modulus operator allowed? – Sid Jan 2 '17 at 8:23
• @Sid No, the modulus operator is not allowed. – fitch496 Jan 2 '17 at 8:39
• Does the fourth rule also apply to "square rooting", because the square root works more or less the same – Fearsome Statue Jan 2 '17 at 10:48
• @FearsomeStatue no, it does not apply. You can use the square root any number of times (even though I don't see how that would help you...). It is possible to solve all numbers without using square root at all :-) – fitch496 Jan 2 '17 at 11:05
• can we round, for example 120/7 -> 17? – ev3commander Jan 2 '17 at 23:45

## 7 Answers

This answer has 29 expressions with the "2017" order. Those NOT in order are denoted by sadness - :(

$1=2*0+1^7$

$2=2^0+1^7$

$3=2+0+1^7$

$4=-2+0-1+7$

$5=-2+(0*1)+7$

$6=(2*0)-1+7$

$7=2^0-1+7$

$8=(2*0)+1+7$

$9=2+(0*1)+7$

$10=2+0+1+7$

$11=2+0!+1+7$

$12=(2+0)*(-1+7)$

$13=(2+0+1)!+7$

$14=(2+0!)!+1+7$

$15=-2+0+17$ (Improved for order by Ivo Beckers)

$16=-((2*0)!)+17$

$17=(2*0)+17$

$18=(2^0)+17$

$19=2+0+17$

$20=2+0!+17$

$21=20+1^7$

$22=-2+ (\sqrt{-(0!-17)})!$ (Improved by Pratheek B!)

$23=(2+0!)!+17$

$24=(2+0!)*(1+7)$

$25=(7-1-0!)^2$ :(

$26=20-1+7$

$27=20+(1*7)$

$28=20+1+7$

$29=27+(1+0!)$ :(

$30=10\sqrt{2+7}$ :(

$31=(2+0!+1)!+7$

$32=2^{-(0!)-1+7}$

FOOLING AROUND (I'm simply curious about how far we can go)

$33=17*2-0!$

$34 = (2+0)*17$ :D

$35=((2+0!)!-1)*7$ (Improved by Christoph!)

$36=(7-1+0)^2$

$37=20+17$ :D

$38=???$

$39=7^2-10$

• Why the sad faces? – Deusovi Jan 2 '17 at 9:24
• @Deusovi, out of order. 15 also needs one. – Peter Taylor Jan 2 '17 at 9:27
• -2 + 0 + 17 to make 15 in order – Ivo Beckers Jan 2 '17 at 9:33
• Very nice and very fast! Beats my number of solutions in order. And good job expanding the limit! – fitch496 Jan 2 '17 at 11:10
• 38 equals what now? – Neil W Jan 2 '17 at 13:22

In order solution for 22:

$-2 + \sqrt{-0! + 17}!$

Okay, I know there's another answer but I'm posting mine before I look at it (honest!). 28/32 in order.

1 = 2^(0*1*7)
2 = 2 + 0*1*7
3 = 2 + 0 + 1^7
4 = -2 + 0 - 1 + 7
5 = -2 + 0*1 + 7
6 = -2 + 0 + 1 + 7
7 = 2*0*1 + 7
8 = (2^0)*1 + 7
9 = 2 + 0*1 + 7
10 = 2 + 0 + 1 + 7
11 = 2 + 0! + 1 + 7
12 = 2*(0 - 1 + 7)
13 = (2 + 0 + 1)! + 7
14 = 2*(0*1 + 7)
15 = -2 + 0 + 17
16 = 2*(0 + 1 + 7)
17 = 2*0 + 17
18 = 2^0 + 17
19 = 2 + 0 + 17
20 = 20 * 1^7
21 = 20 + 1^7
*22 = 21 + 7^0
23 = (2 + 0!)! + 17
24 = (2 + 0!) * (1 + 7)
*25 = (7 - 2)^(0! + 1!)
26 = 20 - 1 + 7
27 = 20 + 1*7
28 = 20 + 1 + 7
*29 = 21 + 0! + 7
*30 = 210 / 7
31 = (2 + 0! + 1)! + 7
32 = 2 * (-0! + 17)

My attempts to press on...

*33 = 2*17 - 0!
34 = (2 + 0)*17
35 = ((2 + 0!)! - 1)*7
36 = 2 * (0! + 17)
37 = 20 + 17
38 = ?
*39 = 7^2 - 10
40 = ?
*41 = ((2 + 0!)! * 7) - 1
42 = (2 + 0!)! *1*7
*43 = ((2 + 0!)! * 7) + 1
44 = ?
45 = ?
46 = ?
*47 = 7^2 - 0! - 1
48 = (2 + 0!)! * (1 + 7)
49 = ((2 + 0!)! + 1) * 7
*50 = 7^2 + 0 + 1
51 = (2 + 0!) * 17

• well, you know, great minds and all that... – Neil W Jan 2 '17 at 10:03

I've been looking for an elegant solution to this problem using octal (base-8) arithmetic. Perhaps someone could help me complete this. There's one I couldn't get the numbers in the right order, and another that I couldn't find any solution. Here's what I've got so far:

Here's my answer, with 29 in order: (I'm working on 25, 29, and 30)

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

Besides 22, I came up with these by myself.

Possible in order solutions for 25 and 29:

2 + (-0! - 1 + 7) = 25
2 + (0! + 1 + 7) = 29

Or is that cheating?

• "+" is addition, not concatenation. So yes, that's cheating. – Rubio Jan 6 '17 at 11:05

A bit cheeky with the use of a decimal point:

(20+1)/.7 = 30

Or, using the same logic:

210/7 = 30