I've already found several, the ones I mostly need are 13, 26, 34-40, and 64-85, but I figure it would be interesting to have a record here for other potentially easier/simpler methods.
-
3$\begingroup$ What operations do you allow? I assume +,-,*,/, and exponents. What about factorial, absolute value, Knuth arrows, concatenation, square root, other roots, etc? $\endgroup$ – benzene Aug 20 '17 at 20:25
-
1$\begingroup$ (You may want to post the ones you DO have as well, so there is a complete record.) $\endgroup$ – Rubio♦ Aug 20 '17 at 20:43
-
3$\begingroup$ 2/2=1 Therefore, every rational number is trivial. $\endgroup$ – Carl Aug 21 '17 at 1:26
-
1$\begingroup$ In any case, if you have 52, you have 13 and 26. If you read [x] as 'the solution for x', then 26=([52])/2, and 13=([26])/2. $\endgroup$ – Jeff Zeitlin Aug 21 '17 at 3:45
-
3$\begingroup$ I take "2, 0, 0, 0" to mean you're allowed to use only one 2 and three 0s, so I can't agree with Carl and Jeff that the puzzle is trivial. I agree with Jeff that concatenation of anything other than literal digits is cheating. $\endgroup$ – Gareth McCaughan♦ Aug 21 '17 at 10:45
A more elegant way to get all the numbers from 1 to 100 if we allow logarithms and the use of lg
as logarithm in base 10 is this (I know, I know, it looks like cheating a bit but it's beautiful)
$x = \log_{\frac{0!}{2}}\left({\lg\underbrace{\sqrt{\sqrt{\dots\sqrt{\frac{0!}{0!\%}\,}\,}\,}}_\text{x+1 square roots}}\right)$
This is equivalent
$x = \log_{\frac{0!}{2}}\left({\lg\underbrace{\sqrt{\sqrt{\dots\sqrt{\frac{1}{\frac{1}{100}}\,}\,}\,}}_\text{x+1 square roots}}\right)$
Moving on
$x = \log_{\frac{1}{2}}\left({\lg\underbrace{\sqrt{\sqrt{\dots\sqrt{10\,}\,}\,}}_\text{x square roots}}\right)$
$x = \log_{\frac{1}{2}}\left({\lg{10^{\frac{1}{2^x}}}}\right)$
$x = \log_{\frac{1}{2}}\frac{1}{2^x}$
But here is the brute force approach without log.
Operations used: + - $\frac{a}{b}$ $\times$ $\sqrt{a}$ $a^b$ $\lfloor a \rfloor$ $\lceil a\rceil$ $a\%$ (wich is basically division by 100) and trigonometrical functions (sin, cos, ...)
$0 = 0 \times 0 \times 0 \times 2$
$1 = 0 \times 0 + 2^0$
$2 = 0 + 0 + 0 + 2$
$3 = 0 + 0 + 0! + 2$
$4 = 0 + 2^{0!+0!}$
$5 = 0! + 2^{0!+0!}$
$6 = (0! + 0!+0!) \times 2 $
$7 = (0! + 2)! + 0! +0$
$8 = (0! + 2)! + 0! +0!$
$9 = (0! + 0! + 0!)^2$
$10 = \frac{20}{0!+0!}$
$11 = \lceil{\sqrt{(2+0! +0!+0!)!}}\rceil$
$12 = (0! + 0! + 0!)! \times 2$
$13 = \lfloor{\sqrt{200}}\rfloor - 0!$
$14 = \lfloor{\sqrt{200}}\rfloor + 0$
$15 = \lceil{\sqrt{200}}\rceil + 0$
$16 = \lceil{\sqrt{200}}\rceil + 0!$
$17 = \lfloor\frac{(2+0!)!}{0!\%}\rfloor + 0!$
$18 = 20 - 0! - 0!$
$19 = 20 + 0 - 0!$
$20 = 20 + 0 + 0$
$21 = 20 + 0! + 0$
$22 = 20 + 0! + 0!$
$23 = (2 + 0! + 0!)! - 0!$
$24 = (2 + 0! + 0!)! + 0$
$25 = (2 + 0! + 0!)! + 0!$
$26 = \lfloor{\sqrt{((2+0!)!)!}}\rfloor + 0 + 0$
$27 = \lceil{\sqrt{((2+0!)!)!}}\rceil + 0 + 0$
$28 = \lceil{\sqrt{((2+0!)!)!}}\rceil + 0! + 0$
$29 = \lceil{\sqrt{((2+0!)!)!}}\rceil + 0! + 0!$
$30 = \sqrt{\frac{0!}{0!\%}} + 20$
$31 = \lceil\sqrt{\sqrt{\sqrt{\sqrt{((2+0!+0!)!)!}}}}\rceil + 0$
$32 = 2 ^{\lfloor\sqrt{\sqrt{((0!+0!+0!)!)!}}\rfloor}$
$33 = \lfloor \frac{\frac{0!}{0!\%}}{2+0!} \rfloor$
$34 = \lceil \frac{\frac{0!}{0!\%}}{2+0!} \rceil$
$35 = \lfloor-\frac{\sqrt{\frac{0!}{0!\%}}}{\sin((2+0!)!)}\rfloor$
$36 = ((0! + 0! + 0!)! )^2$
$37 = \sqrt{\frac{0!}{0!\%}} + \lceil\sqrt{(2+0!)!}\rceil$
$38 = $
$39 = \lfloor\sqrt{\sqrt{\sqrt{\sqrt{\frac{0!}{0!\%}}!}}} \times (2+0!)!\rfloor$
$40 = 20 \times (0! + 0!)$
$41 = \lfloor\sqrt{\sqrt{\sqrt{\frac{0!}{0!\%}}!}}\rfloor - 2 + 0$
$42 = \lfloor\sqrt{\sqrt{\sqrt{\frac{0!}{0!\%}}!}}\rfloor - 2 ^ 0$
$43 = \lfloor\sqrt{\sqrt{\sqrt{\frac{0!}{0!\%}}!}}\rfloor + 2 \times 0$
$44 = \lfloor{\sqrt{2000}}\rfloor$
$45 = \lceil{\sqrt{2000}}\rceil$
$46 = \lfloor\sqrt{\sqrt{\sqrt{\sqrt{\lfloor\sqrt{(2+0!)!}\rfloor!}}}}\rfloor + 0 +0$
$47 = \lfloor\sqrt{\sqrt{\sqrt{\sqrt{\lfloor\sqrt{(2+0!)!}\rfloor!}}}}\rfloor + 0! +0$
$48 = \frac{0!}{(0! + 0!)\%} - 2$
$49 = \frac{0!}{2 \times 0!\%} -0!$
$50 = \frac{0!}{2 \times 0!\%} +0$
$51 = \frac{0!}{2 \times 0!\%} +0!$
$52 = \frac{0!}{(0! + 0!)\%} + 2$
$53 = $
$54 = \lceil{\sqrt{((0! + 0! + 0!)!)!}}\rceil \times 2$
$55 = \lceil{\sqrt{((0! + 0! + 0!)!)!}} \times 2\rceil$
$56 = \lfloor\sqrt{\sqrt{\sqrt{\sqrt{\lfloor\sqrt{(2+0!)!}\rfloor!}}}}\rfloor + \sqrt{\frac{0!}{0!\%}}$
$57 = \lfloor\sqrt{\sqrt{\sqrt{\sqrt{\lceil\sqrt{(2+0!)!}\rceil!}}}}\rfloor + 0 +0$
$58 = \sqrt{\sqrt{\sqrt{\sqrt{\lceil\sqrt{(2+0!)!}\rceil!}}}} + 0! +0$
$59 = \sqrt{\sqrt{\sqrt{\sqrt{\lceil\sqrt{(2+0!)!}\rceil!}}}} + 0! +0!$
$60 = \sqrt{\frac{0!}{0!\%}} \times (2 + 0!)!$
$61 = $
$62 = $
$63 = $
$64 = 2^{(0!+0!+0!)!}$
$65 = \lceil\frac{\frac{0!}{0!\%}}{ctan(((2+0!)!)!)}\rceil$
$66 = $
$67 = \lfloor\sqrt{\sqrt{\sqrt{\sqrt{\lceil\sqrt{(2+0!)!}\rceil!}}}}\rfloor + \sqrt{\frac{0!}{0!\%}}$
$68 = \lceil\sqrt{\sqrt{\sqrt{\sqrt{\lceil\sqrt{(2+0!)!}\rceil!}}}}\rceil + \sqrt{\frac{0!}{0!\%}}$
$69 = \lfloor{\sqrt{(((2+0!)!) + 0!)!}}\rfloor - 0!$
$70 = \lfloor{\sqrt{(((2+0!)!) + 0!)!}}\rfloor + 0$
$71 = \lceil{\sqrt{(((2+0!)!) + 0!)!}}\rceil + 0$
$72 = \lceil{\sqrt{(((2+0!)!) + 0!)!}}\rceil + 0!$
$73 = \frac{0!}{0!\%} - \lceil{\sqrt{((2 + 0!)!)!}}\rceil$
$74 = \frac{0!}{0!\%} - \lfloor{\sqrt{((2 + 0!)!)!}}\rfloor$
$75 = $
$76 = $
$77 = $
$78 = $
$79 = \lfloor\sqrt{\sqrt{\lceil\sqrt{(2+0!+0!+0!)!}\rceil!}}\rfloor$
$80 = \frac{0!}{0!\%} - 20$
$81 = \lceil\sqrt{\sqrt{\sqrt{(\sqrt{\frac{0!}{0!\%}} + 0!)!}}}\rceil ^ 2$
$82 = $
$83 = -\lfloor\cos((2+0!)!)!) * \frac{0!}{0!\%}\rfloor$
$84 = \lfloor\sqrt{(2+0!)!*\sqrt{\frac{0!}{0!\%}}}\rfloor$
$85 = \lceil\sqrt{(2+0!)!*\sqrt{\frac{0!}{0!\%}}}\rceil$
$86 = $
$87 = $
$88 = $
$89 = \lfloor\sin(2) \times \frac{0!}{0!\%}\rfloor - 0!$
$90 = \lfloor\sin(2) \times \frac{0!}{0!\%}\rfloor + 0$
$91 = \lfloor\sin(2) \times \frac{0!}{0!\%}\rfloor + 0!$
$92 = $
$93 = $
$94 = \frac{0!}{0!\%} - (2 + 0!)!$
$95 = \lceil\sqrt{\sqrt{\sqrt{(20 - 0! -0!)!}}}\rceil$
$96 = \lfloor\frac{0!}{0!\%} + ctan((2+0!)!)\rfloor$
$97 = \frac{0!}{0!\%} - 2 - 0!$
$98 = \frac{0!}{0!\%} - 2 + 0$
$99 = \frac{0!}{0!\%} - 2 + 0!$
$100 = \frac{0!}{0!\%} + 2 \times 0$
-
$\begingroup$ Awesome job dude. This is insane. Try arccos for numbers 83-97. Factorial of (2+0!)! was also extremely helpful. $\endgroup$ – Chris Morris Aug 22 '17 at 0:48
-
$\begingroup$ You should probably mention the other functions you're using, such as sine. $\endgroup$ – Draconis Aug 22 '17 at 22:48
Using only the operations +, -, floor, ceiling, factorial (Gamma function extension), and square root:
1 = 2 - 0! + 0 + 0
2 = 2 + 0 + 0 + 0
3 = 2 + 0! + 0 + 0
4 = 2 + 0! + 0! + 0
5 = (2 + 0!)! - 0! + 0
6 = (2 + 0!)! + 0 + 0
7 = (2 + 0!)! + 0! + 0
8 = (2 + 0!)! + 0! + 0!
9 = ceil((sqrt(2)! + 0! + 0!)!) + 0
10 = floor((sqrt(2) + 0! + 0!)!) + 0
11 = ceil((sqrt(2) + 0! + 0!)!) + 0
12 = ceil((sqrt(2) + 0! + 0!)!) + 0!
13 = ceil((sqrt(2)! + 0!)!!!) + 0 + 0
14 = floor((sqrt((2 + 0!)! + 0!) + 0!)!)
15 = ceil((sqrt((2 + 0!)! + 0!) + 0!)!)
16 = floor((sqrt(2 + 0!) + 0! + 0!)!)
17 = ceil((sqrt(2 + 0!) + 0! + 0!)!)
18 = ceil((sqrt(2)!! + 0!)!!!!) + 0 + 0
19 = ceil((sqrt(sqrt((2 + 0!)! + 0!)) + 0!)!!)
20 = floor((sqrt((2 + 0! + 0!)!) - 0!)!)
21 = floor(sqrt((2 + 0!)! + 0!)!!) + 0
22 = ceil((sqrt(2) + 0!)!)! - 0! - 0!
23 = (2 + 0! + 0!)! - 0!
24 = (2 + 0! + 0!)! + 0
25 = (2 + 0! + 0!)! + 0!
26 = floor(sqrt((2 + 0!)!!)) + 0 + 0
27 = ceil(sqrt((2 + 0!)!!)) + 0 + 0
28 = ceil(sqrt((2 + 0!)!!)) + 0! + 0
29 = ceil(sqrt((2 + 0!)!!)) + 0! + 0!
30 = ceil((sqrt((2 + 0!)!)! + 0!)!) + 0
31 = floor(sqrt((sqrt(2) + 0!)!!!)) - 0! + 0
32 = floor((sqrt(sqrt(2)) + 0! + 0! + 0!)!)
33 = ceil((sqrt(sqrt(2)) + 0! + 0! + 0!)!)
34 = ceil(sqrt((sqrt(2) + 0!)!!!)) + 0! + 0
35 = floor((sqrt(2)! + 0! + 0! + 0!)!)
36 = ceil((sqrt(2)! + 0! + 0! + 0!)!)
37 = ceil(((sqrt(2)!! + 0!)! + 0! + 0!)!)
38 = floor((sqrt(2 + 0!) + 0!)!!) - 0!
39 = floor((sqrt(2 + 0!) + 0!)!!) + 0
40 = ceil((sqrt(2 + 0!) + 0!)!!) + 0
41 = ceil((sqrt(2 + 0!) + 0!)!!) + 0!
42 = floor((sqrt((sqrt(2) + 0!)!) + 0!)!!) + 0
43 = ceil((sqrt((sqrt(2) + 0!)!) + 0!)!!) + 0
44 = floor(((sqrt(sqrt(2)) + 0!)! + 0! + 0!)!)
45 = floor((sqrt(2) + 0! + 0! + 0!)!)
46 = ceil((sqrt(2) + 0! + 0! + 0!)!)
47 = ceil(sqrt(sqrt(((sqrt(sqrt(2)) + 0!)! + 0!)!!))) + 0
48 = floor((sqrt((2 + 0!)!) + 0! + 0!)!)
49 = ceil((sqrt((2 + 0!)!) + 0! + 0!)!)
50 = ceil(sqrt(((sqrt(sqrt(2)) + 0! + 0!)! - 0!)!))
51 = floor((sqrt((sqrt(2) + 0!)!!) + 0! + 0!)!)
52 = floor(sqrt((sqrt(sqrt(2)) + 0! + 0!)!)!!) + 0
53 = floor(sqrt(sqrt((sqrt(2) + 0! + 0!)!!))) + 0
54 = floor(((sqrt(sqrt(2) + 0!) + 0!)! + 0!)!)
55 = ceil(((sqrt(sqrt(2) + 0!) + 0!)! + 0!)!)
56 = floor(((sqrt(2)! + 0!)!! + 0!)!) + 0
57 = ceil(((sqrt(2)! + 0!)!! + 0!)!) + 0
58 = ceil(((sqrt(2)! + 0!)! + 0! + 0!)!)
59 = ceil(((sqrt(sqrt((2 + 0!)!)) + 0!)! + 0!)!)
60 = ceil(sqrt(floor(sqrt((2 + 0!)! + 0!)!!))!) + 0
61 = floor(sqrt(sqrt((2 + 0!)! + 0!)!!)!) + 0
62 = ceil(sqrt(sqrt((2 + 0!)! + 0!)!!)!) + 0
63 = floor((sqrt(sqrt(sqrt(2)) + 0! + 0!) + 0!)!!)
64 = ceil((sqrt(sqrt(sqrt(2)) + 0! + 0!) + 0!)!!)
65 = ceil(sqrt((sqrt((sqrt(2) + 0! + 0!)!)! - 0!)!))
66 = floor((sqrt(ceil((sqrt(2) + 0!)!!)) + 0! + 0!)!)
67 = floor(((sqrt(2 + 0!)! + 0!)! + 0!)!)
68 = ceil(((sqrt(2 + 0!)! + 0!)! + 0!)!)
69 = floor(sqrt(((2 + 0!)! + 0!)!)) - 0!
70 = floor(sqrt(((2 + 0!)! + 0!)!)) + 0
71 = ceil(sqrt(((2 + 0!)! + 0!)!)) + 0
72 = ceil(sqrt(((2 + 0!)! + 0!)!)) + 0!
73 = floor((sqrt(sqrt(sqrt(2) - 0!)) + 0! + 0!)!!)
74 = floor((sqrt(sqrt(2)! + 0! + 0!) + 0!)!!)
75 = ceil((sqrt(sqrt(2)! + 0! + 0!) + 0!)!!)
76 = ceil((((sqrt(2) - 0!)! + 0!)! + 0!)!!)
77 = floor(sqrt(sqrt(sqrt(((2 + 0!)! - 0!)!)!))) + 0
78 = ceil(sqrt(sqrt(sqrt(((2 + 0!)! - 0!)!)!))) + 0
79 = floor(sqrt(sqrt(ceil((sqrt(2) + 0! + 0!)!)!))) + 0
80 = ceil(sqrt(sqrt(ceil((sqrt(2) + 0! + 0!)!)!))) + 0
81 = floor(sqrt((sqrt(2)!! + 0! + 0!)!!)) + 0
82 = ceil(sqrt((sqrt(2)!! + 0! + 0!)!!)) + 0
83 = ceil(((sqrt(2)!! + 0!)!!! + 0!)!) + 0
84 = floor(sqrt(ceil((sqrt(2) + 0!)!)! - 0!)!) - 0!
85 = floor(sqrt((2 + 0! + 0!)! - 0!)!)
86 = ceil(sqrt((2 + 0! + 0!)! - 0!)!)
87 = floor(sqrt(((sqrt(2) + 0!)!! + 0!)!)) + 0
88 = ceil(sqrt(((sqrt(2) + 0!)!! + 0!)!)) + 0
89 = ceil(sqrt(sqrt((2 + 0!)!)!!!)) + 0 + 0
90 = ceil(sqrt(sqrt((2 + 0!)!)!!!)) + 0! + 0
91 = ceil(sqrt(sqrt((2 + 0!)!)!!!)) + 0! + 0!
92 = floor(((sqrt(sqrt(2) - 0!)! + 0!)! + 0!)!!)
93 = ceil(((sqrt(sqrt(2) - 0!)! + 0!)! + 0!)!!)
94 = floor(sqrt((2 + 0!)! + 0! + 0!)!!)
95 = ceil(sqrt((2 + 0!)! + 0! + 0!)!!)
96 = ceil(sqrt(floor((sqrt(2)! + 0! + 0!)!))!!) + 0!
97 = floor(sqrt(sqrt(((sqrt(2) + 0! + 0!)! + 0!)!)))
98 = ceil(sqrt(sqrt(((sqrt(2) + 0! + 0!)! + 0!)!)))
99 = floor(sqrt(((sqrt(2)! + 0! + 0!)! - 0!)!))
100 = floor(sqrt((2 + 0! + 0!)!)!) - 0!
It should be noted that copying one of the above formulas into WolframAlpha might not give the right answer. This is because it interprets '!!' as the "double factorial function": n!! = n(n-2)(n-4)..., where I use n!! to mean (n!)!. Putting spaces between the exclamation points should fix this.
-
$\begingroup$ Just picking one to test: for 100, your $\lfloor \sqrt{(2+0!+0!)!}! \rfloor - 0!$ simplifies to $\lfloor \sqrt{24}! \rfloor - 1$, but $\sqrt{24}$ isn't a whole number, so the usual factorial operator doesn't work. You've also applied factorial to other irrational roots (e.g. see 95). Are you using a different factorial operator? $\endgroup$ – Lawrence Aug 22 '17 at 23:46
-
1$\begingroup$ @Lawrence I'm actually using the Gamma function, the most common extension of factorial to nonintegers. I will edit the answer to specify this. $\endgroup$ – benzene Aug 22 '17 at 23:52
1 to 100 Using Simple Operations - complete
Operators used: +, -, !, $\sqrt{\cdot}$, %, $\lfloor \cdot \rfloor$, $\lceil \cdot \rceil$. I also concatenate 2 to 0 to form 20, and get reciprocals with $a^{-(0!)}$ and use bracketing. Multiplication and division operators are not used in this answer.
Split the given 4 digits into two sets, {0,0} and {2,0}. We can form 1-7 just using either set:
\begin{array}{clll} 1 & = 0! + 0 & = 2 - 0! \\ 2 & = 0! + 0! & = 2 + 0 \\ 3 & = \lfloor √\sqrt{0!\%^{-(0!)}} \rfloor & = 2 + 0! & \\ 4 & = \lceil √\sqrt{0!\%^{-(0!)}} \rceil & = \lfloor \sqrt{20} \rfloor \\ 5 & = \lfloor √(\lceil √\sqrt{0!\%^{-(0!)}} \rceil !) \rfloor & = \lceil \sqrt{20} \rceil \\ 6 & = \lfloor √√√(\sqrt{0!\%^{-(0!)}}!) \rfloor & = (2 + 0!)! \\ 7 & = \lceil √√√(\sqrt{0!\%^{-(0!)}}!) \rceil & = \lfloor \sqrt{2\%^{-(0!)}} \rfloor \\ \end{array}
We now form 8-11 using either definition of 5 and 7 above:
\begin{array}{cccc} 8 = \lfloor √√(7!) \rfloor & 9 = \lceil √√(7!) \rceil & 10 = \lfloor √(5!) \rfloor & 11 = \lceil √(5!) \rceil \end{array}
Now that we can construct all the numbers from 1 to 11 using just {2,0} as well as using just {0,0}, if we have any integer $x$ constructed from either set, we can get all the integers $x + k$, where $-11 \leq k \leq 11$. If $x$ was formed from {2,0}, form $k$ from {0,0}, and vice versa.
Pick any of the above expressions for the numbers in the expansions below.
\begin{array}{c|c|c} x & \text{expansion} & \text{covers} \\ \hline 11 & \lceil √(5!) \rceil & 0 - 22 \\ 24 & 4! & 13 - 35 \\ 44 & \lceil √√(10!) \rceil & 33 - 55 \\ 50 & 2\%^{-1} & 39 - 61 \\ 71 & \lceil √(7!) \rceil & 60 - 82 \\ 80 & \lceil √√(11!) \rceil & 69 - 91 \\ 100 & 0!\%^{-(0!)} & 89 - 111 \end{array}
This produces all the numbers from 0 to 111. If it's required to use all 4 digits in {2,0,0,0}, observe that none of the combinations above use just the 3 zeros. They either use all 4 digits or at least one 0 is unused. If a 0 is unused, multiply that 0 by the sum of all the remaining unused digits, and add the result (also 0) to the original expression.
-
$\begingroup$ If you assume that you can use an arbitrary number of the digits 0 and 2, why don't you simply define 1 as 0! and every following number N to be (N-1)+1? In that case, there is absolutely no need for concatenation or seven nested square roots. $\endgroup$ – jarnbjo Aug 21 '17 at 15:04
-
1$\begingroup$ @jarnbjo That's not my assumption. In my (partial) answer, I assume that there are only 4 literals that can be combined: '2', '0', '0', '0'. However, to avoid writing things like "0!" or "(2 + 1)!", I've allowed the notation to refer to other numbers. So "1" is short-hand for "0!", but if we've used 3 instances of "0!" in the expression, we can't generate any more "1"s to use in that expression. For example, "27" uses only 2 literals: one instance of "2" and one instance of "0", combined to form "3", then "6", then "27" by using factorial and other operators. $\endgroup$ – Lawrence Aug 21 '17 at 15:07
-
$\begingroup$ Note also that in the expressions for 1 to 40, only the original 4 literals are concatenated (e.g. "2" || "0" to form "20"). I've managed to avoid concatenation of generated numerals (e.g. "0!" || "0!" = "11") in the current version. $\endgroup$ – Lawrence Aug 21 '17 at 15:19
-
$\begingroup$ @jarnbjo Just in case you were wondering about the extra '2's: the ones in brackets are actually (0! + 0!). $\endgroup$ – Lawrence Aug 22 '17 at 10:45