All numbers from to can be represented as sum above, where are distinct digits. What is maximal value of ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
r = Union [ Table [ { a , b , c , d , e , f , g , h , i } = p ; a + b ( c + d ) + e ( f ( g + h ) + i ) , { p , Permutations [ Range [ 0 , 9 ] , { 9 } ] } ] ] ; Last [ r ] − First [ r ] ⇒ 9 9 3
English translation: Compute a list of all values of the expression while iterating over all permutations of integers from 0 to 9 inclusive taken 9 integer at a time, reduce the list to a sorted set of values and subtract the first value from the last value.