So I was learning about programming and came up with this pretty interesting algorithm: the addition algorithm in calculating the fastest way to reach some $n^p$. (a link to it is here:https://www.quora.com/What-are-some-fast-algorithms-for-computing-the-nth-power-of-a-number) I was thinking if it is possible to prove some power not satisfying this algorithm: for example $n^{15}$ doesn't follow this as $n^{15}$ is written as $n^8*n^4*n^2*n^1$ in the addition algorithm, which requires 6 step: squaring $n$(1st), squaring $n^2$(2nd), squaring $n^4$(3rd) and multiply $n^8$ by $n^4$(4th) by $n^2$ (5th) and by $n^1$ (6th) writing but it can be written quicker, which is squaring $n$(1st), multiply $n^2$ by $n$ (2nd), squaring $n^3$ (3rd), squaring $n^6$ and multiply it $n^{12}$ by $n^3$.
So now I wonder if there is to way to prove this mathematically, that is, the addition algorithm doesn't work on certain numbers that have a/ several properties. (such as number 15) Some hints and suggestions would be greatly appreciated!
Edit: the question can be simplified as: how can one find integers that have shorter path than the addition chain suggests, if possible.