7
$\begingroup$

Let's say we have $n$ ones, i.e. $1,1,\dots,1$ $n$ times and are allowed to add them, multiply and insert brackets wherever we want.

What is the largest number we can get for a particular $n$? Is there a closed form or at least an OEIS sequence?

For $n=5$ it appears to be $(1+1)(1+1+1)=6$, for $n=6$ it appears to be $(1+1+1)(1+1+1)=9$, for $n=9$ I found $(1+1+1)(1+1+1)(1+1+1)=27$ to be the largest number.

But I don't see a way to find a general formula. I guess it would make sense to start from the other end - for each number $N$ find a factorization with the least sum of factors or something like that.

  • 1
    The largest number you can create with 5 1's is $11\ 111$2017-01-22
  • 0
    @Travis, I never said we could use the decimal number system2017-01-22
  • 0
    That's why that's a comment and not an answer2017-01-22
  • 1
    Would it be correct to say we're just adding parentheses to the expression $1 + 1 + \ldots + 1$? er, I guess not, as evidenced by $(1 + 1)(1 + 1 + 1)$...2017-01-22
  • 0
    It looks like you should be able to do induction to prove that your basic method of forming as many $1+1+1$ terms as possible will give you the maximum number. To be precise, if n is a multiple of 3, get a bunch of those terms, if n mod 3 = 2, then get a bunch of those term plus another 1+1, and if n mod3 = 1, then get two 1+1 terms, and otherwise 1+1+1 terms2017-01-22
  • 0
    @Bram28, that seems surprising. I'm sure at some point I'll have to switch to $1+1+1+1$ and other terms2017-01-22
  • 3
    Look at each factor. If the factor is the sum of more than $4$ ones, then splitting it into $(1+1)(1+\dotsc + 1)$ produces $2(k-2) > k$, so in the maximal expression, each factor is at most $4$. Since $(1+1+1+1) = (1+1)(1+1)$, we can replace each factor $4$ with two factors $2$, so we have only factors $2$ and $3$. Since $3^2 > 2^3$, we have at most two factors $2$. If $n = 3m$, the maximum is $3^m$, if $n = 3m+1$, the maximum is $3^{m-1}\cdot 2^2$, and if $n = 3m+2$, it's $3^m\cdot 2$.2017-01-22
  • 0
    @YuriyS no... With 4 1s you can just as well make (1+1)*(1+1), and with 5, we know that (1+1)*(1+1+1) is better than 1+1+1+1+1 ... So ... Get a bunch of 2 and 3 terms!2017-01-22
  • 0
    @DanielFischer, thank you. Since you posted this as a comment, I will accept Bram28's answer, I hope you don't mind2017-01-22
  • 0
    You can see R. K. Guy, _Unsolved Problems in Number Theory_, Third ed., Springer (1994), p. 263 (Problem F26)2017-01-22
  • 0
    @Watson, thanks, found it. But why is this unsolved? I found the answers by Daniel Fischer and Bram28 to be very convincing2017-01-22
  • 0
    @YuriyS : this looks indeed surprising... I didn't read the answers, but maybe you can look at [this paper](https://arxiv.org/pdf/1404.1850.pdf).2017-01-22

3 Answers 3

10

Since

1) it doesn't make sense to create any 1+1+1+... terms with more than 3 1's, since 1+1+1+1+1 is 'worse' than (1+1) times (1+1+1), and for more 1's it will be even 'better' to multiply several 1+1+.. Terms rather than have one long one, and with 4 1s 1+1+1+1 is just as good as (1+1) times (1+1),

and

2) two 1+1+1 terms is better than three 1+1 terms,

your basic strategy is to get as many 1+1+1 terms as possible. So:

If n mod 3 = 0, the best you can do is $3^{n/3}$

If n mod 3 = 1, get two 1+1 terms, and otherwise 1+1+1 terms, so you get $4*3^{(n-4)/3}$

If n mod 3 = 2, get one 1+1 term in addition to 1+1+1 terms, so $2*3^{(n-2)/3}$

  • 2
    So, it appears to be [A000792](http://oeis.org/A000792)... Thank you, that makes sense2017-01-22
1

Don't know if this could be an "approximate" solution or anything. But try the following.

If the final expression consists of $x_1 \times ... \times x_k$ where $x_1+...+x_k=n$, with $k

  • 1
    When you compare $n/e$ with the correct answer, it's actually not that far off...2017-01-22
0

Obviously the problem reduces to finding the maximum of $a_1 \cdot a_2 \cdot ... \cdot a_t$, when $a_1 + a_2 + ... + a_t = n$. Now let's increase $a_1$ by one and decrease $a_2$ by one. Then the value of $a_1 \cdot a_2 \cdot ... \cdot a_t$ will increase if $a_1 \ge a_2+2$. Eventually this leads to concluding that for a "fixed" $t$ the maximum will occur when $a$'s are as close as possible.

Now let's find the optimal $t$. As previously concluded assume that $a_1 = \cdots = a_t = a$. Then we have $a = \frac nt$. Now $a_1 \cdot a_2 \cdot ... \cdot a_t = \left(\frac nt \right)^t$. This function obtains a maximum at $t=e$, so therefore the maximum is obtained for $t = \frac ne$

As all the variables are integers and as the functions are continuous we have that the we need to choose $t = \left\lfloor \frac ne \right\rfloor$ or $\left\lfloor \frac ne \right\rfloor + 1$. In each case we choose $a_i = \left\lfloor \frac nt \right\rfloor$ or $\left\lfloor \frac nt \right\rfloor + 1$ accordingly, s.t. the sum is $n$. This reduces the problem to few cases, which can be easily checked.