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

Home > Numbers
Inder Taneja's discovery (Posted on 2017-05-11) Difficulty: 3 of 5
Natural numbers from 0 to 11111 are written in terms of 1 to 9 in two different ways. The first one in increasing order of 1 to 9, and the second one in decreasing order. This is done by using the operations of addition, multiplication, subtraction, potentiation, and division.
In both the situations there are no missing numbers, except one, i.e., 10958 in the increasing case.
Examples:
591=123*4+5*6+78-9
7936=123+4^5+6789
6439 = 9 * (8 + 7 + 6) + 5^4 * (3^2 + 1)

Please try to express the missing number obeying the specified rules.
Summarize your results.

Taneja’s paper is here - https://arxiv.org/abs/1302.1479

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts some computer results | Comment 1 of 4
10958.3317287401 .331728740100516  ,1,2*,3^,4+,5/,6,7+,8/,9+^

represents 

10958.3317287401 as an approximation to 10958
which is less than 1/3 unit away from the goal, and
the form of Reverse Polish Notation that I'm using to represent the formula is: ,1,2*,3^,4+,5/,6,7+,8/,9+^, which translates into the algebraic:

(((1*2)^3 + 4) / 5) ^ ((6+7)/8 + 9)

which reduces to

2.4 ^ 10.625

I wrote that while the program was still running. Since then closer values have been found:

10957.7327718651 .267228134922334,1,2^,3-,4,5,6,7-,8/-^,9*+
10957.8525439016 .147456098377006,1,2^,3,4/,5,6,7*,8*,9/-^+
10957.8525439016 .147456098377006,1,2^,3,4/,5,6,7,8**,9/-^+
10957.8525439016 .147456098377006,1,2^,3,4/,5,6,7,8*,9/*-^+

Let's examine 

10957.8525439016 .147456098377006,1,2^,3,4/,5,6,7,8**,9/-^+

less than 1/6 unit away from the goal.

The RPN, ,1,2^,3,4/,5,6,7,8**,9/-^+ translates to 

1^2 + (3/4) ^ (5 - 6*7*8/9)

=  1 + .75 ^ (-32.333...) ~= 10957.8525439016

Then newer results:

10958.1155551728 .115555172767927,1,2,3/+,4+,5^,6*,7-,8,9/^

or 

((1 + 2/3 + 4)^5 * 6 - 7) ^ (8/9)  ~= 10958.1155551728 

This is the best one found.

The whole output giving successively better approximations follows, with the difference from 10958 shown as the second number on each line, with the first number being the approximation itself.

4480 6478,1,2*,3*,4*,5*,6*,7*,8*,9/
5023 5935,1,2*,3*,4*,5*,6*,7*,8-,9-
5041 5917,1,2*,3*,4*,5*,6*,7*,8-,9+
5057 5901,1,2*,3*,4*,5*,6*,7*,8+,9+
5670 5288,1,2*,3*,4*,5*,6*,7*,8/,9*
5670 5288,1,2*,3*,4*,5*,6*,7*,8,9//
5695 5263,1,2*,3*,4*,5*,6*,7-,8*,9-
5713 5245,1,2*,3*,4*,5*,6*,7-,8*,9+
6345 4613,1,2*,3*,4*,5*,6*,7-,8-,9*
6489 4469,1,2*,3*,4*,5*,6*,7-,8+,9*
12121 1163,1,2*,3*,4*,5*,6*,7-,8,9+*
10791 167,1,2*,3*,4*,5*,6*,7,8+*,9-
10809 149,1,2*,3*,4*,5*,6*,7,8+*,9+
10944 14,1,2*,3*,4*,5*,6-,7,89+*
10962 4,1,2*,3*,4*,5*,6+,78,9+*
10959.7327718651 1.73277186507767,1,2*,3*,4-,5,6,7*,8/+^,9*
10959.7327718651 1.73277186507767,1,2*,3*,4-,5,6,7,8/*+^,9*
10958.4 .399999999997817,1,2*,3*,4^,5/,6*,7*,8,9*+
10958.4 .399999999997817,1,2*,3*,4^,5,6//,7*,8,9*+
10958.3317287401 .331728740100516,1,2*,3^,4+,5/,6,7+,8/,9+^
10958.3317287401 .331728740100516,1,2^,3*,4*,5/,6,7+,8/,9+^
10957.7327718651 .267228134922334,1,2^,3-,4,5,6,7-,8/-^,9*+
10957.8525439016 .147456098377006,1,2^,3,4/,5,6,7*,8*,9/-^+
10957.8525439016 .147456098377006,1,2^,3,4/,5,6,7,8**,9/-^+
10957.8525439016 .147456098377006,1,2^,3,4/,5,6,7,8*,9/*-^+
10958.1155551728 .115555172767927,1,2,3/+,4+,5^,6*,7-,8,9/^

 done
 
DefDbl A-Z
Dim crlf$, nlist$, nptr, closest, closelist$, lst$, stack(11), stacklvl


Private Sub Form_Load()
 Form1.Visible = True
 
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 nlist = "123456789"
 nptr = 1
 stacklvl = 0
 
 lst = ""
 
 addOn
 
 
 Text1.Text = Text1.Text & crlf & " done"
  
End Sub

Sub addOn()
  DoEvents
  lin = Len(lst)
  If stacklvl = 1 Then
    If nptr = 10 Then
      If Abs(10958 - stack(1)) <= Abs(closest - 10958) Then
        Text1.Text = Text1.Text & stack(1) & Str(Abs(10958 - stack(1)))
        Text1.Text = Text1.Text & lst & crlf
        closest = stack(1)
        closelist = lst
      End If
    End If
  End If
  If stacklvl >= 2 Then
    y = stack(2): x = stack(1)
    stack(1) = x * y
    For i = 2 To 10
       stack(i) = stack(i + 1)
    Next
    stacklvl = stacklvl - 1
    lst = lst + "*"
    
    addOn
    
    For i = 11 To 3 Step -1
       stack(i) = stack(i - 1)
    Next
    stack(2) = y: stack(1) = x
    stacklvl = stacklvl + 1
    lst = Left(lst, Len(lst) - 1)
   
    y = stack(2): x = stack(1)
    stack(1) = y - x
    For i = 2 To 10
       stack(i) = stack(i + 1)
    Next
    stacklvl = stacklvl - 1
    lst = lst + "-"
    
    addOn
    
    For i = 11 To 3 Step -1
       stack(i) = stack(i - 1)
    Next
    stack(2) = y: stack(1) = x
    stacklvl = stacklvl + 1
    lst = Left(lst, Len(lst) - 1)
    
    y = stack(2): x = stack(1)
    stack(1) = x + y
    For i = 2 To 10
       stack(i) = stack(i + 1)
    Next
    stacklvl = stacklvl - 1
    lst = lst + "+"
    
    addOn
    
    For i = 11 To 3 Step -1
       stack(i) = stack(i - 1)
    Next
    stack(2) = y: stack(1) = x
    stacklvl = stacklvl + 1
    lst = Left(lst, Len(lst) - 1)
    
    If Abs(stack(1)) > 1E-100 Then
        y = stack(2): x = stack(1)
        stack(1) = y / x
        For i = 2 To 10
           stack(i) = stack(i + 1)
        Next
        stacklvl = stacklvl - 1
        lst = lst + "/"
        
        addOn
        
        For i = 11 To 3 Step -1
           stack(i) = stack(i - 1)
        Next
        stack(2) = y: stack(1) = x
        stacklvl = stacklvl + 1
        lst = Left(lst, Len(lst) - 1)
   End If
    
    nflag = 0
    If stack(2) = 0 And stack(1) > 0 Then good = 1 Else good = 0
    If stack(2) < 0 And stack(1) = Int(stack(1)) Then
           q = Int(x / 2): r = x - 2 * q
           If r = 0 Then nflag = 1
           good = 1
    End If
    If Abs(stack(2)) > 0 Then If stack(1) * Log(Abs(stack(2))) / Log(10) < 50 Then good = 1
    If good Then
        y = stack(2): x = stack(1)
        xodd = 0: xeven = 0
        If x = Int(x) And x >= 0 Then
         If stack(2) <> 0 Then good = 0
         If good = 0 Then If stack(1) * Log(Abs(stack(2))) / Log(10) < 50 Then good = 1
         If good Then
           q = Int(x / 2): r = x - 2 * q
           If r = 1 Then
              xodd = 1
            Else
              xeven = 1
           End If
         End If
        End If
        If y >= 0 Or xodd Or xeven Then
            If y < 0 Then
              If xodd Then
               stack(1) = (-Abs(y)) ^ x
              ElseIf xeven Then
               stack(1) = (Abs(y)) ^ x
              End If
            Else
               stack(1) = y ^ x
            End If
            For i = 2 To 10
               stack(i) = stack(i + 1)
            Next
            stacklvl = stacklvl - 1
            lst = lst + "^"
            
            addOn
            
            For i = 11 To 3 Step -1
               stack(i) = stack(i - 1)
            Next
            stack(2) = y: stack(1) = x
            stacklvl = stacklvl + 1
            lst = Left(lst, Len(lst) - 1)
        End If
    End If
  End If   ' stacklvl>=2
  
 If Len(lst) <> lin Then
    xx = xx
 End If
  
  
  If nptr < 10 Then
     For i = 11 To 2 Step -1
        stack(i) = stack(i - 1)
     Next
     stack(1) = Val(Mid(nlist, nptr, 1))
     nptr = nptr + 1
     stacklvl = stacklvl + 1
     lst = lst + "," + Mid(nlist, nptr - 1, 1)
     
     addOn
     
     For i = 1 To 10
        stack(i) = stack(i + 1)
     Next
     nptr = nptr - 1
     stacklvl = stacklvl - 1
     lst = Left(lst, Len(lst) - 2)
     
     If Len(lst) <> lin Then
       xx = xx
     End If

     
     If Len(lst) > 0 And InStr(nlist, Right(lst, 1)) > 0 Then
        stack(1) = 10 * stack(1) + Val(Mid(nlist, nptr, 1))
        lst = lst + Mid(nlist, nptr, 1)
        nptr = nptr + 1
        
        addOn
        
        nptr = nptr - 1
        stack(1) = (stack(1) - Val(Mid(nlist, nptr, 1)))
        lst = Left(lst, Len(lst) - 1)
     End If
     
 If Len(lst) <> lin Then
    xx = xx
 End If
     
     
  End If
  
 If Len(lst) <> lin Then
    xx = xx
 End If
  
  
End Sub


The lines that say xx=xx were for placing halts (breakpoints) placed into the program to see where the lst string (the RPN sequence) was losing positions during debugging.

By the way,

for the downward version for the same number, the program finds exact values:

,9,8*,76*,5-,4,3*+,2*,1*
,9,8*,76*,5-,4,3*+,2*,1/
,9,8*,76*,5-,4,3*+,2*,1^
,9,8*,76*,5-,4,3*+,2,1**
,9,8*,76*,5-,4,3*+,2,1/*
,9,8*,76*,5-,4,3*+,2,1^*
,9,8*,76*,5,4,3*--,2*,1*
,9,8*,76*,5,4,3*--,2*,1/
,9,8*,76*,5,4,3*--,2*,1^
,9,8*,76*,5,4,3*--,2,1**
,9,8*,76*,5,4,3*--,2,1/*
,9,8*,76*,5,4,3*--,2,1^*
,9,8,7*,65*+,4+,3*,2-,1+
,9,8,7*,65*+,4+,3*,2,1--
,9,8,7*,65*,4++,3*,2-,1+
,9,8,7*,65*,4++,3*,2,1--
,9,8,7,6*-,5,4,3^*,2+*-,1+
,9,8,7,6*-,5,4,3^*,2+*,1--
,9,8,7,6,5,4*-,3^+*,2/-,1+
,9,8,7,6,5,4*-,3^+*,2/,1--
,9,8,7,6,5,4*-,3^+,2/*-,1+
,9,8,7,6,5,4*-,3^+,2/*,1--
,9,8,7,65**+,4+,3*,2-,1+
,9,8,7,65**+,4+,3*,2,1--
,9,8,7,65**,4++,3*,2-,1+
,9,8,7,65**,4++,3*,2,1--
,9,8,76**,5-,4,3*+,2*,1*
,9,8,76**,5-,4,3*+,2*,1/
,9,8,76**,5-,4,3*+,2*,1^
,9,8,76**,5-,4,3*+,2,1**
,9,8,76**,5-,4,3*+,2,1/*
,9,8,76**,5-,4,3*+,2,1^*
,9,8,76**,5,4,3*--,2*,1*
,9,8,76**,5,4,3*--,2*,1/
,9,8,76**,5,4,3*--,2*,1^
,9,8,76**,5,4,3*--,2,1**
,9,8,76**,5,4,3*--,2,1/*
,9,8,76**,5,4,3*--,2,1^*
,9,8,76*,5,4+*,3+,2*+,1-
,9,8,76*,5,4+*,3+,2*,1-+
,9,8,76,5,4+**,3+,2*+,1-
,9,8,76,5,4+**,3+,2*,1-+
,9,876,5*,4,3,2/-*+,1-
,9,876,5*,4,3,2/-*,1-+
,9,876,5,4,3,2/-**+,1-
,9,876,5,4,3,2/-**,1-+



Translating some of these into algebraic form:

,9,8*,76*,5-,4,3*+,2,1^*      (9*8*76 - 5 + 4*3) * 2^1
,9,8*,76*,5,4,3*--,2*,1*      (9*8*76 - (5 - 4*3)) * 2 * 1
,9,8,7*,65*,4++,3*,2-,1+      (9 + 8*7*65 + 4) * 3 - 2 + 1  (Taneja's chosen decreasing formula)
,9,8,7,6*-,5,4,3^*,2+*-,1+    9 - (8 - 7 * 6) * (5 * 4^3 + 2) + 1
,9,8,7,6,5,4*-,3^+,2/*-,1+    9 - 8 * (7 + (6 - 5*4)^3)/2  + 1
,9,876,5,4,3,2/-**,1-+        9 + 876 *  5 * (4 -  3/2) - 1

Edited on May 11, 2017, 2:10 pm
  Posted by Charlie on 2017-05-11 14:08:31

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information