 All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars  perplexus dot info  50 - or more (Posted on 2020-09-10) Let's start with a triplet of integers, say (1, 2, 5) and a set of mathematical operations (+, -, *, /, ^, sqrt, fact!, concatenation, brackets).

Our task will be to represent all (or almost all - as explained below) integers from 1 to n using some or all of the initial triplet and any quantity of operations defined above.

So:
1=1
6=1+5
9=5*2-1
13=15-2
27=51-4!
60=12*5 etc

Let's define n as the first occurrence of not being able to find a valid representation for n+1 and for n+2. I believe that in our case n=17 (15+2), since neither 18 nor 19 get valid solutions.

You are requested to find a triplet of integers (a,b,c) enabling a maximal n.

 No Solution Yet Submitted by Ady TZIDON No Rating Comments: ( Back to comment list | You must be logged in to post comments.) computer finding | Comment 1 of 14
With 4, 7 and 9 we can get up to 77, where we encounter 78 and 79 as impossible.

For some reason my program didn't allow for single-digit formulae, so 4 was given as sqrt(7+9), 7 as sqrt(49) and 9 as sqrt(4)+7.

Some other bugs were fixed, but I haven't run a full comparison of all positive combinations. But here's the repaired set for the top combination of the first run:

` n  RPN           Algebraic  1  4,9v-         4-sqrt(9) 2  4v            sqrt(4) 3  9v            sqrt(9) 4  7,9+v         sqrt((7+9)) 5  9,4-          9-4 6  9v!           (sqrt(9))! 7  49v           sqrt(49) 8  4,9v^v        sqrt(4^sqrt(9)) 9  4v,7+         sqrt(4)+710  7,9v+         7+sqrt(9)11  4,7+          4+712  4,9v*         4*sqrt(9)13  4,9+          4+914  4v,7*         sqrt(4)*715  4!,9-         (4)!-916  7,9+          7+917  4!,7-         (4)!-718  4v,9*         sqrt(4)*919  4,7*,9-       4*7-920  4,7+,9+       4+7+921  7,9v*         7*sqrt(9)22  4!,7+,9-      (4)!+7-923  4v,7*,9+      sqrt(4)*7+924  4!            (4)!25  4,7*,9v-      4*7-sqrt(9)26  4!,7-,9+      (4)!-7+927  4!,9v+        (4)!+sqrt(9)28  4,7*          4*729  4,9*,7-       4*9-730  4!,9v!+       (4)!+(sqrt(9))!31  4!,7+         (4)!+732  4v,7,9+*      sqrt(4)*(7+9)33  4!,9+         (4)!+934  4,7*,9v!+     4*7+(sqrt(9))!35  7,9,4-*       7*(9-4)36  4,9*          4*937  4,7*,9+       4*7+938  47,9-         47-939  7,9*,4!-      7*9-(4)!40  4,7,9v+*      4*(7+sqrt(9))41  47,9v!-       47-(sqrt(9))!42  49,7-         49-743  4,9*,7+       4*9+744  47,9v-        47-sqrt(9)45  7,4v-,9*      (7-sqrt(4))*946  4,7,9v!*+     4+7*(sqrt(9))!47  47            4748  4!,9,7-*      4!*(9-7)49  49            4950  47,9v+        sqrt(9)51  4!,7-,9v*     ((4)!-7)*sqrt(9)52  4,7,9v!+*     4*(7+(sqrt(9))!)53  47,9v!+       47+(sqrt(9))!54  7,4-!,9*      ((7-4))!*955  79,4!-        79-(4)!56  47,9+         47+957  4,9v^,7-      4^sqrt(9)-758  7,4^v,9+      sqrt(7^4)+959  7,9*,4-       7*9-460  7,4v-,9v!!*v  sqrt(((7-sqrt(4))*((sqrt(9))!)!))61  7,9*,4v-      7*9-sqrt(4)62  63  7,9*          7*964  4,9v^         4^sqrt(9)65  74,9-         74-966  4,7+,9v!*     (4+7)*(sqrt(9))!67  4,7,9*+       4+7*968  74,9v!-       74-(sqrt(9))!69  70  4,9v!+,7*     (4+(sqrt(9))!)*771  74,9v-        74-sqrt(9)72  4!,9v*        (4)!*sqrt(9)73  97,4!-        97-(4)!74  74            7475  79,4-         79-476  4,9!,7!/+     4+(9)!/(7)!77  74,9v+        74+sqrt(9)7879  79            7980  74,9v!+       (sqrt(9))!81  9,4^v         sqrt(9^4)8283  4,79+         4+7984  4,7*,9v*      4*7*sqrt(9)`

I also tried using zero as a member of the triplet, but for some reason also, my algorithm didn't try using it even for adding 1 via 0!. But at least I think I've got the maximal result without any triplet containing zero.

Most of this program has been used in other such puzzles, and an outer loop was added, to go through all combinations of three positive digits, and not to try more exotic things like double factorial.

 Posted by Charlie on 2020-09-10 14:25:40 Please log in:

 Search: Search body:
Forums (3)