How can I get the numbers from (0-30) by using the number $2$ four times.Use any common mathematical function and the (+,-,*,/,^) I tried to solve this puzzle, but I couldn't solve it completely. Some of my results were: $$2/2-2/2=0$$ $$(2*2)/(2*2)=1$$ $$2/2+2/2=2$$ $$2^2-2/2=3$$ $$\frac{2*2}{2}+2=4$$ $$2^2+2/2=5$$ $$2^2*2-2=6$$ $$\frac{2^{2*2}}{2}=8$$ $$(2+2/2)^2=9$$ $$2*2*2+2=10$$ $$2*2*2*2=16$$ $$22+2/2=23$$ $$(2+2)!+2/2=25$$ $$(2+2)!+2+2=28$$
Get the numbers from (0-30) by using the number $2$ four times
13.2k Views Asked by user187581 https://math.techqa.club/user/user187581/detail AtThere are 11 best solutions below
On
$14=2^{2^2}-2$
and
$18=2^{2^2}+2$
$13=\frac{22}2+2$
$24=\frac{(2^2)!}{\frac22}$
$20=\sqrt{{22}^2}-2=(2^2)!-2^2$
$22=\sqrt{\left[(2^2)!-2\right]^2}$
On
I'm pretty sure that $7$ is impossible. In fact, $11,13,15,17,19$ and every number from $20$ to $30$ is imposssible, too.
$A=$Possible results with two twos: $0,1,4$
$B=$New possible results with three twos: $3,6,8,16$
$C=$New results of an operation with a two and an element of $B$: $5,9,10,12,14,18,32,36,64,256$
Operating two elements of $A$ gives nothing new.
On
$$7=\left\lfloor e^2 \right\rfloor+2(2-2)=2.2.2-\lg2$$ $$11=\left \lceil e^2 \right \rceil +2+2/2=\frac{22}{2}\lg2$$ $$17=2^{2^2}+\lg2$$
On
Though I suspect this may be pushing common functions..
$2^2 + 2 + \Gamma(2) = 7$
$22/{\sqrt{2}^2} = 11$
$\int_{2/2}^{22}dx =21$
$\int_{2-2}^{22}dx =22$
$(2+2)! + \sqrt{2+2} = 26$
On
The following is a complete list of the rationals obtainable by the five binary operations you gave, from a list of four twos. There are numerous expressions for many of the results and several invalid expressions (like $(2-2)^{2-2}$), but only the first valid expression my program found is shown below. $$\begin{array}{ll} -4194302 & 2-2^{22} \\ -482 & 2-22^2 \\ -220 & 2-222 \\ -42 & 2-2\cdot 22 \\ -40 & 2\cdot (2-22) \\ -22 & 2-(2+22) \\ -21 & \frac{2}{2}-22 \\ -18 & (2+2)-22 \\ -14 & 2-(2+2)^2 \\ -10 & \frac{2-22}{2} \\ -9 & 2-\frac{22}{2} \\ -6 & 2-(2+2) 2 \\ -4 & 2-((2+2)+2) \\ -3 & \frac{2}{2}-(2+2) \\ -2 & 2\cdot (2-2)-2 \\ -\frac{21}{11} & \frac{2}{22}-2 \\ -\frac{3}{2} & \frac{2}{2+2}-2 \\ -1 & \frac{1}{2} (2-(2+2)) \\ -\frac{1}{2} & \frac{1}{2} \left(\frac{2}{2}-2\right) \\ -\frac{1}{10} & \frac{2}{2-22} \\ 0 & (2+2)-(2+2) \\ \frac{1}{2097152} & \frac{2}{2^{22}} \\ \frac{1}{1048576} & 2^{2-22} \\ \frac{1}{242} & \frac{2}{22^2} \\ \frac{1}{121} & \left(\frac{2}{22}\right)^2 \\ \frac{1}{111} & \frac{2}{222} \\ \frac{1}{22} & \frac{2}{2\ 22} \\ \frac{1}{12} & \frac{2}{2+22} \\ \frac{1}{10} & \frac{2}{22-2} \\ \frac{1}{8} & \frac{2}{(2+2)^2} \\ \frac{2}{11} & \frac{2+2}{22} \\ \frac{1}{4} & \frac{2}{2\cdot (2+2)} \\ \frac{1}{3} & \frac{2}{(2+2)+2} \\ \frac{1}{2} & \frac{2^{2-2}}{2} \\ \frac{2}{3} & \frac{2}{\frac{2}{2}+2} \\ 1 & \frac{2+2}{2+2} \\ \frac{3}{2} & 2-\frac{2}{2+2} \\ \frac{21}{11} & 2-\frac{2}{22} \\ 2 & 2\cdot (2-2)+2 \\ \frac{23}{11} & 2+\frac{2}{22} \\ \frac{5}{2} & \frac{2}{2+2}+2 \\ 3 & \frac{1}{2} ((2+2)+2) \\ 4 & ((2+2)+2)-2 \\ 5 & (2+2)+\frac{2}{2} \\ \frac{11}{2} & \frac{22}{2+2} \\ 6 & (2+2) 2-2 \\ 8 & ((2+2)+2)+2 \\ 9 & \left(\frac{2}{2}+2\right)^2 \\ 10 & 2\cdot (2+2)+2 \\ 12 & 2\cdot ((2+2)+2)\\ 13 & 2+\frac{22}{2} \\ 14 & (2+2)^2-2 \\ 16 & (2+2) (2+2) \\ 18 & (2+2)^2+2 \\ 21 & 22-\frac{2}{2} \\ 22 & (2-2)+22 \\ 23 & \frac{2}{2}+22 \\ 26 & (2+2)+22 \\ 32 & 2\cdot (2+2)^2 \\ 36 & ((2+2)+2)^2 \\ 40 & 2\cdot (22-2) \\ 42 & 2\cdot 22-2 \\ 44 & 22+22 \\ 46 & 2+2\cdot 22 \\ 48 & 2 (2+22) \\ 64 & (2\cdot (2+2))^2 \\ 88 & (2+2)\cdot 22 \\ 111 & \frac{222}{2} \\ 121 & \left(\frac{22}{2}\right)^2 \\ 220 & 222-2 \\ 224 & 222+2 \\ 242 & \frac{22^2}{2} \\ 256 & (2+2)^{2+2} \\ 400 & (2-22)^2 \\ 444 & 222\cdot 2 \\ 482 & 22^2-2 \\ 484 & 22\cdot 22 \\ 486 & 2+22^2 \\ 576 & (2+22)^2 \\ 968 & 2\cdot 22^2 \\ 1936 & (2\cdot 22)^2 \\ 2048 & 2^{22/2} \\ 2222 & 2222 \\ 49284 & 222^2 \\ 65536 & 2^{(2+2)^2} \\ 234256 & 22^{2+2} \\ 1048576 & 2^{22-2} \\ 2097152 & \frac{2^{22}}{2} \\ 4194302 & 2^{22}-2 \\ 4194306 & 2+2^{22} \\ 8388608 & 2\cdot 2^{22} \\ 16777216 & 2^{2+22} \\ \textit{big number} & (2+2)^{22} \\ \textit{big number} & 22^{22} \\ \textit{big number} & 2^{222} \\ \textit{big number} & 2^{22^2} \\ \textit{huge number} & 2^{2^{22}} \end{array}$$ You can also get $\sqrt[11]{2}=2^{2/22}$ and $\sqrt{2}=2^{\frac{2}{2+2}}$. No other reals can be made.
The Mathematica code used to generate it basically "contracted" pairs out of a list by applying a binary operation to the pair until the list was a singleton. Adding a factorial would be easy to modify the code to do, but the list would no longer be finite. (You could also add negation similarly, and if you're clever, you can even keep the list finite). It also wouldn't be too hard to make it output LaTeX
Children[x_, ops_] := Join @@ Table[ Table[{Join[x[[1]][[1 ;; i - 1]], {o[x[[1, i]], x[[1, i + 1]]]}, x[[1]][[i + 2 ;; Length[x[[1]]]]]], Join[x[[2]][[1 ;; i - 1]], {{o, x[[2, i]], x[[2, i + 1]]}}, x[[2]][[i + 2 ;; Length[x[[1]]]]]]}, {i, 1, Length[x[[1]]] - 1}], {o, ops}]; CombineStuff[t_, ops_] := DeleteDuplicates[Join @@ (Children[#, ops] & /@ t)]; DrawForm[f_] := If[NumberQ[f], ToString[f], StringJoin["(", DrawForm[f[[2]]], f[[1]], DrawForm[f[[3]]], ")"]]; vals = {#[[1, 1, 1]], Last /@ #} & /@ Gather[Nest[ Function[t, CombineStuff[ t, {#1 + #2 &, #1 - #2 &, #1*#2 &, #1/#2 &, #1^#2 &}]], {{{2, 2, 2, 2}, {2, 2, 2, 2}}}, 3], #1[[1]] == #2[[1]] &]; Sort[{#[[1]], DrawForm[#[[2, 1, 1]]]} & /@ (vals /. Thread[{#1 + #2 &, #1 - #2 &, #1*#2 &, #1/#2 &, #1^#2 &} -> {"+", "-", "*", "/", "^"}])]
I used a similar program to "solve" the game where you look at a clock and figure out what expressions can be made of it. Admittedly, this answer very much resembles "solving" a puzzle by taking out the answer key.
(P.S. Is there a way to include such a table without slowing the program that turns LaTeX into beauty? Or to post code in a nicer form? Sorry if you have a slow computer. Please feel free to edit this to make it less bad)
On
Are you allowed $.\dot 2=\frac 29$? That opens up a host of possibilities - for example $2+2+\sqrt {\cfrac 2{.\dot 2}}=7$
On
A slightly more creative way for 12 and 17:
$|2+2\sqrt{-2}|^2 = 12$
$|(2+2)!+\sqrt{-2}|/{\sqrt{2}} = 17$
On
We don't seem to have 15 yet:
${2\cdot 2 + 2 \choose 2} = 15$
If we're going to use $\Gamma$ and the like, we can get $30$ too:
$2 \cdot {\Gamma(2+2) \choose 2} = 30$
No $19$ or $27$ or $29$ yet either (though this keeps getting more absurd):
$\lfloor{2+\sqrt{2}}\rfloor^{\lfloor{2+\sqrt{2}}\rfloor} = 27$
$\lfloor \mathrm{Exp}(2)\rfloor \cdot \lfloor{2 + \sqrt{2}}\rfloor - 2 = 19$
$\lfloor \mathrm{Exp}(2)\rfloor \cdot (2 + 2) + \lfloor{\sqrt{2}}\rfloor = 29$
I think every number has appeared once now (some rather more questionably than others).
$0=2+2-2-2$ uses four twos not three.
$10=\cfrac {22-2}2$