[Question]
  [
Your task is to write a program that, on input n, outputs the *minimal expression* of each number 1 through n in order. The shortest program in bytes wins. 
A minimal expression combines 1's with addition and multiplication to result in the given number, using as few 1's as possible. For example, `23` is expressed as `23=((1+1+1)(1+1)+1)(1+1+1)+1+1` with eleven ones, which is minimal.
Requirements:
1. The program must take as input a positive natural number n.
2. Output must be in this format: `20 = ((1+1+1)(1+1+1)+1)(1+1)`
3. Your output may not have needless parentheses, like `8 = ((1+1)(1+1))(1+1)`.
4. The multiplication sign `*` is optional.
5. Spaces are optional.
6. You don't have to output all the possible equations for given value: For example, you have the choice to output `4=1+1+1+1` or `4=(1+1)(1+1)`. You don't have to output both.
7. The shortest program (in bytes) in each language wins.
```
1=1
2=1+1
3=1+1+1
4=1+1+1+1
5=1+1+1+1+1
6=(1+1+1)(1+1)
7=(1+1+1)(1+1)+1
8=(1+1+1+1)(1+1)
9=(1+1+1)(1+1+1)
10=(1+1+1)(1+1+1)+1
11=(1+1+1)(1+1+1)+1+1
12=(1+1+1)(1+1)(1+1)
13=(1+1+1)(1+1)(1+1)+1
14=((1+1+1)(1+1)+1)(1+1)
15=(1+1+1+1+1)(1+1+1)
16=(1+1+1+1)(1+1)(1+1)
17=(1+1+1+1)(1+1)(1+1)+1
18=(1+1+1)(1+1+1)(1+1)
19=(1+1+1)(1+1+1)(1+1)+1
20=((1+1+1)(1+1+1)+1)(1+1)
```
Here are some more test cases: (remember, that other expressions with the same number of 1's are also allowed)
```
157=((1+1+1)(1+1)(1+1)+1)(1+1+1)(1+1)(1+1)+1
444=((1+1+1)(1+1+1)(1+1)(1+1)+1)(1+1+1)(1+1)(1+1)
1223=((1+1+1)(1+1+1)(1+1+1)(1+1+1)(1+1+1)+1)(1+1+1+1+1)+1+1+1
15535=((((1+1+1)(1+1+1)(1+1+1)(1+1+1)+1)((1+1+1)(1+1)+1)+1)(1+1+1)+1)(1+1+1)(1+1+1)+1
45197=((((1+1+1)(1+1)(1+1)(1+1)+1)(1+1+1+1+1)(1+1)+1)(1+1+1)(1+1)(1+1)+1)(1+1+1+1+1)(1+1+1)+1+1
```
Good Luck!
- The Turtle üê¢
  
[Answer]
# Pyth, 60 bytes
```
LjWqeb\1b`()L?tbho/N\1++'tb"+1"m+y'/bdy'df!%bTr2b1VSQ++N\='N
```
[Demonstration](https://pyth.herokuapp.com/?code=LjWqeb%5C1b%60%28%29L%3Ftbho%2FN%5C1%2B%2B%27tb%22%2B1%22m%2By%27%2Fbdy%27df%21%25bTr2b1VSQ%2B%2BN%5C%3D%27N&input=1223&debug=0)
The online compiler can reach 1223 before the time out, thanks to Pyth's automatic function memoization.
```
1223=((1+1+1)(1+1+1)(1+1+1)(1+1+1)(1+1+1)+1)(1+1+1+1+1)+1+1+1
```
In abbrieviated notaion,
```
1223=(3^5+1)*5+3
```
This uses a recursive function `'`, which calculates all possbile products and sums which could give the desired output, finds the shortest string with each final operation, then compares them by `1` count and returns the first one.
It uses a helper function, `y`, which parenthesizes an expression only if it needs to be parenthesized.
Offline, I am running the program with the input `15535`, and it is nearly complete. Results are printed incrementally, so it is easy to see the progress.
Final lines of the output:
```
15535=((((1+1+1)(1+1+1)(1+1+1)(1+1+1)+1)((1+1+1)(1+1)+1)+1)(1+1+1)+1)(1+1+1)(1+1+1)+1
real    7m8.430s
user    7m7.158s
sys 0m0.945s
```
In abbreviated notation,
```
15535=(((3^4+1)*(3*2+1)+1)*3+1)*3^2+1
```
[Answer]
# CJam, ~~105~~ ~~102~~ ~~98~~ 96 bytes
```
q~{)'=1$2,{:I{I1$-'+}%3/1>Imf'*+aImp!*+{)\{j}%\+}:F%{e_"+*"-:+}$0=}j2,{F)_'*={;{'(\')}%1}&*}jN}/
```
Try it online in the [CJam interpreter](http://cjam.aditsu.net/#code=q~%7B)'%3D1%242%2C%7B%3AI%7BI1%24-'%2B%7D%253%2F1%3EImf'*%2BaImp!*%2B%7B)%5C%7Bj%7D%25%5C%2B%7D%3AF%25%7Be_%22%2B*%22-%3A%2B%7D%240%3D%7Dj2%2C%7BF)_'*%3D%7B%3B%7B'(%5C')%7D%251%7D%26*%7DjN%7D%2F&input=20).
### Test run
The online interpreter is too slow for the larger test cases. Even with the Java interpreter, the larger test cases will take a *long* time and require a significant amount of memory.
```
$ time cjam integer-complexity.cjam <<< 157
1=1
2=1+1
3=1+1+1
4=1+1+1+1
5=1+1+1+1+1
6=(1+1)(1+1+1)
7=1+(1+1)(1+1+1)
8=(1+1)(1+1)(1+1)
9=(1+1+1)(1+1+1)
10=1+(1+1+1)(1+1+1)
11=1+1+(1+1+1)(1+1+1)
12=(1+1)(1+1)(1+1+1)
13=1+(1+1)(1+1)(1+1+1)
14=(1+1)(1+(1+1)(1+1+1))
15=(1+1+1)(1+1+1+1+1)
16=(1+1)(1+1)(1+1)(1+1)
17=1+(1+1)(1+1)(1+1)(1+1)
18=(1+1)(1+1+1)(1+1+1)
19=1+(1+1)(1+1+1)(1+1+1)
20=(1+1)(1+1)(1+1+1+1+1)
21=(1+1+1)(1+(1+1)(1+1+1))
22=1+(1+1+1)(1+(1+1)(1+1+1))
23=1+1+(1+1+1)(1+(1+1)(1+1+1))
24=(1+1)(1+1)(1+1)(1+1+1)
25=1+(1+1)(1+1)(1+1)(1+1+1)
26=(1+1)(1+(1+1)(1+1)(1+1+1))
27=(1+1+1)(1+1+1)(1+1+1)
28=1+(1+1+1)(1+1+1)(1+1+1)
29=1+1+(1+1+1)(1+1+1)(1+1+1)
30=(1+1)(1+1+1)(1+1+1+1+1)
31=1+(1+1)(1+1+1)(1+1+1+1+1)
32=(1+1)(1+1)(1+1)(1+1)(1+1)
33=1+(1+1)(1+1)(1+1)(1+1)(1+1)
34=(1+1)(1+(1+1)(1+1)(1+1)(1+1))
35=(1+1+1+1+1)(1+(1+1)(1+1+1))
36=(1+1)(1+1)(1+1+1)(1+1+1)
37=1+(1+1)(1+1)(1+1+1)(1+1+1)
38=(1+1)(1+(1+1)(1+1+1)(1+1+1))
39=(1+1+1)(1+(1+1)(1+1)(1+1+1))
40=(1+1)(1+1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1+1)(1+(1+1)(1+1)(1+1)(1+1))
154=1+(1+1+1)(1+1+1)(1+(1+1)(1+1)(1+1)(1+1))
155=(1+1+1+1+1)(1+(1+1)(1+1+1)(1+1+1+1+1))
156=(1+1)(1+1)(1+1+1)(1+(1+1)(1+1)(1+1+1))
157=1+(1+1)(1+1)(1+1+1)(1+(1+1)(1+1)(1+1+1))
real    0m3.896s
user    0m4.892s
sys     0m0.066s
```
Given enough time, it would produce these solutions for the next test cases:
```
444=(1+1)(1+1)(1+1+1)(1+(1+1)(1+1)(1+1+1)(1+1+1))
1223=1+1+(1+1+1)(1+1+(1+1+1)(1+1+1))(1+(1+1)(1+1)(1+1+1)(1+1+1))
```
[Answer]
# Julia, 229 bytes
```
n->(F=i->K[i]>0?E[i]:"("E[i]")";C=[1;3:n+1];K=0C;E=fill("1",n);for s=1:n for i=1:s√∑2 (D=C[i]+C[s-i])<C[s]?(C[s]=D;E[s]=E[i]"+"E[s-i];K[s]=0):s%i>0||(D=C[i]+C[j=s√∑i])<C[s]&&(C[s]=D;E[s]=F(i)F(j);K[s]=1)end;println("$s="E[s])end)
```
This is actually pretty fast. Assigning the function to `f` and running `@time f(15535)` gives the output (last two lines only)
```
15535=1+(1+1+1)(1+1+1)(1+(1+1+1)(1+(1+(1+1)(1+1+1))(1+(1+1+1)(1+1+1)(1+1+1)(1+1+1))))
32.211583 seconds (263.30 M allocations: 4.839 GB, 4.81% gc time)
```
and for `@time f(45197)`, it gives
```
45197=1+1+(1+1+1)(1+1+1+1+1)(1+(1+1)(1+1)(1+1+1)(1+(1+1)(1+1+1+1+1)(1+(1+1)(1+1)(1+1)(1+1+1))))
289.749564 seconds (2.42 G allocations: 43.660 GB, 4.91% gc time)
```
So, what's the code doing? Simple - `C` holds the current one-`C`ount for the number, `K` is an indicator array keeping track of whether the expression is, fundamentally, a sum or a product, for the purposes of dealing with bracketing, and `E` holds the `E`xpression itself. Working its way up from `s=1` through to `n`, the code searches for the minimal representation of number `s` in terms of lower values, by looking for either a sum or a product. If it's a product, then it checks the two components and puts brackets around them if they're sums. That check is done in function `F`, to save bytes (because it has to be done twice, for the two factors).
[Answer]
# [Haskell](https://www.haskell.org/), 208 bytes
```
import Data.List;f n=mapM putStrLn[show x++"="++m x|x<-[1..n]];m 1="1";m n=head$sortOn(filter(>'0'))[let b=m$div n x;q=last b>'0'in concat["(",m x,")",['('|q],b,[')'|q]]|x<-[2..n-1],mod n x<1]++[m(n-1)++"+1"]
```
[Try it online!](https://tio.run/##HY4xb8MgFIT3/oqnp0gGQayQ1aFTx1QZMiIGEtsyKmDH0MZD/rvz3OlOd9J3N7j804Wwrj5O41zgyxVXn30uTQ9JRzd9w/RbrmU@J5OH8QmLEKhRiAjLazntjarrZG0TQWlUSJr00Ll2l4l2Saz3oXQz@6wOFecmdAVuOu5a/wcJluahg8sUbbVPcB/T3RWDDCXhJXKUpmLV62HljRzfnP1fPdLqXlkZx3YDnZQVwkRGGad/QqFdoyOihh6Oh4/1DQ "Haskell ‚Äì Try It Online")
]