All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Four fours (Posted on 2018-02-14)
Arrange 4 fours into various expressions to generate all integer numbers, from 1 to 112 inclusive like:

1 = 44 ÷ 44
2=sqrt 4 - (4 - 4) x 4
3 = (4 + 4 + 4) ÷ 4
4 = 4 + 4 × (4 - 4)
... ...
7= 44/4-4
... ...
19=4!-4-4/4
... ...
100=4*4!+sqrt(4*4)
etc

Allow use of concatenation, +, -, x, /, sqrt, exponentation, factorial,decimal fractions, overline & brackets.

Source: Inspired by Martin Gardner statement.

 No Solution Yet Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: minor tweak to three fours program; 7 goal numbers remain unsolved Comment 6 of 6 |
(In reply to minor tweak to three fours program; 7 goal numbers remain unsolved by Charlie)

Well, I found the bugs in my program:

1. Even the "three fours" from which I copied the code, did not consider .4 without the bar (i.e., 4/10).

2. The new program did not modify the number of 4's expected in the case of either .4 with or without the bar, and so either of those entries was not considered if three 4's had already been used.

I had limited the number of successive square roots to sqrt(sqrt(.... However it was not necessary to remove this restriction as, for example, 73 was found to be  ((4)!+(4)!+sqrt((.4.)))/sqrt((.4.))

That has been remedied and the new output (which has also been extended to 121 though indeed 113 is missing--not that that was asked for in the puzzle, but I guess that's why the limit was set at 112).

Note many more ways are available even for the ones where a previous solution was given:
```1 3268733 44,44/            44/44
2 282918 44,4+,4!/          (44+4)/(4)!
3 79280 44,4/,4v-v          sqrt((44/4-sqrt(4)))
4 152171 44,4-,4!-v         sqrt((44-4-(4)!))
5 79985 44,4!-,4/           (44-(4)!)/4
6 115499 44,4-,4-v          sqrt((44-4-4))
7 6163 44,4/,4-             44/4-4
8 28014 44,4-,4!+v          sqrt((44-4+(4)!))
9 9962 44,4/,4v-            44/4-sqrt(4)
10 10097 44,4-,4/           (44-4)/4
11 1027 44,4,4*v/           44/sqrt((4*4))
12 21481 44,4+,4/           (44+4)/4
13 621 44,4/,4v+            44/4+sqrt(4)
14 1413 4,4+,4+,4v+         4+4+4+sqrt(4)
15 2812 44,4/,4+            44/4+4
16 26864 44,4-,4!-          44-4-(4)!
17 1267 44,4!+,4/           (44+(4)!)/4
18 4434 44,4v/,4-           44/sqrt(4)-4
19 1071 4!,4-,4,4/-         (4)!-4-4/4
20 7829 44,4-,4v/           (44-4)/sqrt(4)
21 1735 44,4v-,4v/          (44-sqrt(4))/sqrt(4)
22 6454 44,4/,4v*           (44/4)*sqrt(4)
23 23908 44,4v+,4v/         (44+sqrt(4))/sqrt(4)
24 271390 44,4+,4!-         44+4-(4)!
25 37821 4,4/,4+,4^v        sqrt((4/4+4)^4)
26 11372 44,4v/,4+          44/sqrt(4)+4
27 3905 4,4,4/-,4!+         4-4/4+(4)!
28 9623 44,4,4*-            44-4*4
29 2164 4,4/,4+,4!+         4/4+4+(4)!
30 4818 4,4+,4*,4v-         (4+4)*4-sqrt(4)
31 92 4,4!+,4/,4!+          (4+(4)!)/4+(4)!
32 5843 44,4!,4v/-          44-(4)!/sqrt(4)
33 266 44,4,4,9/*v/         44/sqrt((4*.4.))
34 652 44,4!+,4v/           (44+(4)!)/sqrt(4)
35 250 44,4/,4!+            44/4+(4)!
36 10946 44,4-,4-           44-4-4
37 298 4,4!+,4,4,9//+       4+(4)!+4/(.4.)
38 458 44,4-,4v-            44-4-sqrt(4)
39 193 44,4v,4,10//-        44-sqrt(4)/(.4)
40 2789 44,4,4*v-           44-sqrt((4*4))
41 40 44,4,4,9//v-          44-sqrt((4/(.4.)))
42 443 44,4-,4v+            44-4+sqrt(4)
43 164 44,4,4/-             44-4/4
44 1517 44,44*v             sqrt((44*44))
45 650 44,4,4/+             44+4/4
46 811 44,4+,4v-            44+4-sqrt(4)
47 878 44,4,4,9//v+         44+sqrt((4/(.4.)))
48 21122 44,4,4*v+          44+sqrt((4*4))
49 1237 4,4/,4!+,4!+        4/4+(4)!+(4)!
50 1533 44,4+,4v+           44+4+sqrt(4)
51 56 4!,4!+,4,4,9//v+      (4)!+(4)!+sqrt((4/(.4.)))
52 1062 44,4+,4+            44+4+4
53 202 44,4,4,9//+          44+4/(.4.)
54 5586 44,4,4,10//+        44+4/(.4)
55 334 44,4v/,4,10//        (44/sqrt(4))/(.4)
56 726 44,4!,4v/+           44+(4)!/sqrt(4)
57 60 4!,4!+,4,4,9//+       (4)!+(4)!+4/(.4.)
58 220 4,4^,4!-,4/          (4^4-(4)!)/4
59 202 4,4!+,4,9//,4-       (4+(4)!)/(.4.)-4
60 6357 44,4,4*+            44+4*4
61 271 4,4/,4!,4,10//+      4/4+(4)!/(.4)
62 213 4,4*,4*,4v-          4*4*4-sqrt(4)
63 133 4,4^,4-,4/           (4^4-4)/4
64 6205 44,4-,4!+           44-4+(4)!
65 121 4,4,4^+,4/           (4+4^4)/4
66 226 44,4!+,4v-           44+(4)!-sqrt(4)
67 9 4,4,4!+,4,9//+         4+(4+(4)!)/(.4.)
68 249 44,4,4*v!+           44+(sqrt((4*4)))!
69 28 44,4v+,4,9/v/         (44+sqrt(4))/sqrt((.4.))
70 231 44,4!+,4v+           44+(4)!+sqrt(4)
71 14 4,4!+,4,10/+,4,10//   (4+(4)!+.4)/(.4)
72 3544 44,4+,4!+           44+4+(4)!
73 6 4!,4!+,4,9/v+,4,9/v/   ((4)!+(4)!+sqrt((.4.)))/sqrt((.4.))
74 115 4,4!*,4!-,4v+        4*(4)!-(4)!+sqrt(4)
75 140 44,4,9//,4!-         44/(.4.)-(4)!
76 127 4,4!,4-*,4-          4*((4)!-4)-4
77 11 4,4,9//,4^v,4-        sqrt((4/(.4.))^4)-4
78 159 4,4!,4-*,4v-         4*((4)!-4)-sqrt(4)
79 14 4,4,9//,4^v,4v-       sqrt((4/(.4.))^4)-sqrt(4)
80 1166 44,4-,4v*           (44-4)*sqrt(4)
81 1169 4,4/,4-,4^          (4/4-4)^4
82 37 4,4!,4-*,4v+          4*((4)!-4)+sqrt(4)
83 19 4v,4,4,9//,4^v+       sqrt(4)+sqrt((4/(.4.))^4)
84 209 44,4v*,4-            44*sqrt(4)-4
85 22 4,4,4,9//,4^v+        4+sqrt((4/(.4.))^4)
86 29 44,4v*,4v-            44*sqrt(4)-sqrt(4)
87 9 4,4!*,4,4,9//-         4*(4)!-4/(.4.)
88 410 44,44+               44+44
89 6 4!,4!,4v+,4,10//+      (4)!+((4)!+sqrt(4))/(.4)
90 684 44,4v*,4v+           44*sqrt(4)+sqrt(4)
91 4 4,4!*,4v,4,10//-       4*(4)!-sqrt(4)/(.4)
92 497 44,4v*,4+            44*sqrt(4)+4
93 6 4,4!*,4,4,9//v-        4*(4)!-sqrt((4/(.4.)))
94 177 4,4!*,4-,4v+         4*(4)!-4+sqrt(4)
95 291 44,4,9//,4-          44/(.4.)-4
96 12619 44,4+,4v*          (44+4)*sqrt(4)
97 433 4,4/,4,4!*+          4/4+4*(4)!
98 301 44,4!,4,9//+         44+(4)!/(.4.)
99 47 44,4^vv,4,9//         sqrt(sqrt(44^4))/(.4.)
100 1283 4,4/,4!+,4*        (4/4+(4)!)*4
101 6 44,4,9//,4v+          44/(.4.)+sqrt(4)
102 77 4,4,4!*+,4v+         4+4*(4)!+sqrt(4)
103 2 44,4,9//,4+           44/(.4.)+4
104 345 4,4+,4,4!*+         4+4+4*(4)!
105 41 44,4v-,4,10//        (44-sqrt(4))/(.4)
106 38 44,4,10//,4-         44/(.4)-4
107 6 4!,4!+,4,9/-,4,9//    ((4)!+(4)!-.4.)/(.4.)
108 866 44,4+,4,9//         (44+4)/(.4.)
109 7 44,4,10/-,4,10//      (44-.4)/(.4)
110 78 4,4,4!+*,4v-         4*(4+(4)!)-sqrt(4)
111 20 444,4/               444/4
112 505 44,4v*,4!+          44*sqrt(4)+(4)!
113 0
114 47 44,4,10//,4+         44/(.4)+4
115 9 44,4v+,4,10//         (44+sqrt(4))/(.4)
116 547 4,4/,4+!,4-         ((4/4+4))!-4
117 33 4,4!+,4!+,4,9//      (4+(4)!+(4)!)/(.4.)
118 537 4,4/,4+!,4v-        ((4/4+4))!-sqrt(4)
119 142 4v,4,10//!,4,4/-    ((sqrt(4)/(.4)))!-4/4
120 81357 44,4!-,4/!        (((44-(4)!)/4))!
121 238 44,4/,4^v           sqrt((44/4)^4)
```

 Posted by Charlie on 2018-02-14 23:02:47

 Search: Search body:
Forums (0)