0

Optimal addition subtraction chain
math code-golf
An addition-subtraction chain, is a sequence \$a_1, a_2, a_3, ... ,a_n\$, such that \$a_1=1\$ and for all \$i > 1\$, there exist \$j,k<i\$ such that \$a_i = a_j \pm a_k\$.
Your task, is given a number \$x\$, find the shortest addition-subtraction ...