Integer complexity

The complexity of a natural number n is the minimum number of ones required to write an arithmetic expression for n using ones, addition, multiplication and parentheses. It is denoted by $$\left\| n \right\|$$. The integer complexity has a corresponding sequence in The On-Line Encyclopedia of Integer Sequences: A005245. Jānis Iraids has calculated the sequence up to $$n=10^{12}$$ and the data is available in an interactive form.

Equivalently,
 * $$\left\| n \right\| = \min_{a+b = n \vee a\cdot b = n} {(\left\| a \right\| + \left\| b \right\|)}$$.

Logarithmic complexity
Since the integer complexity of n is bounded by $$c\cdot\log_3{n}$$, the logarithmic complexity $$\left\| n \right\|_{log} = \frac{\left\| n \right\|}{\log_3 {n}}$$ is of interest as a sort of efficiency measure of n.

The "best" numbers
The numbers on the left side of the logarithmic complexity distribution curves are simple and their expressions are known. These numbers are also known as sequence A000792 on The On-Line Encyclopedia of Integer Sequences.

The "worst" numbers
The numbers represented on the right side of the logarithmic complexity distribution curves are more complex. The number represented by the rightmost nonzero column is the smallest number of the given complexity. These numbers are also known as sequence A005520 on The On-Line Encyclopedia of Integer Sequences.

It has been conjectured that starting from the 26th all these numbers are primes.

Some numerical data
This table summarizes what is known about the "best" and "worst" numbers as well as the distribution of numbers of equal complexity.

Concerning the best expressions
There have been conjectures as to what can be the best expression of a number. Notably, it was conjectured, that for prime numbers
 * $$\left\|p\right\| = 1+\left\|p-1\right\|$$

and
 * $$\left\|2p\right\| = \min{\{2+\left\|p\right\|, 1+\left\|2p-1\right\|\}}$$.

Even though the intuition behind the hypotheses is very natural - if the number is written as a sum, one of the addends should be very small, i.e. 1, since "expected contribution" to the other addend (as an addend to one of its multipliers) is so much more greater - both of these hypotheses have been shown to be false. However, the smallest offending numbers are quite large: 353942783 and 5139300347, respectively.

Some more counterexamples are listed in this table:

Up to $$5*10^{11}$$ there are 283 counterexamples (all in ) to the second conjecture. The first 50 are:

Programs
A program to calculate complexity in base {1,+,-,*} is found here:.