All you can think of are minimum and maximum values, and you can get stuck doing this by eye. You can check that example 510 can be done in 11 multiplications.

1) \(\displaystyle{x}\times{x}={x}^{{{2}}}\)

2) \(\displaystyle{x}^{{{2}}}\times{x}={x}^{{{3}}}\)

3) \(\displaystyle{x}^{{{3}}}\times{x}^{{{3}}}={x}^{{{6}}}\)

4) \(\displaystyle{x}^{{{6}}}\times{x}^{{{6}}}={x}^{{{12}}}\)

5) \(\displaystyle{x}^{{{12}}}\times{x}^{{{3}}}={x}^{{{15}}}\)

6) \(\displaystyle{x}^{{{15}}}\times{x}^{{{15}}}={x}^{{{30}}}\)

7) \(\displaystyle{x}^{{{30}}}\times{x}^{{{30}}}={x}^{{{60}}}\)

8) \(\displaystyle{x}^{{{60}}}\times{x}^{{{60}}}={x}^{{{120}}}\)

9) \(\displaystyle{x}^{{{120}}}\times{x}^{{{120}}}={x}^{{{240}}}\)

10) \(\displaystyle{x}^{{{240}}}\times{x}^{{{15}}}={x}^{{{255}}}\)

11) \(\displaystyle{x}^{{{255}}}\times{x}^{{{255}}}={x}^{{{510}}}\)

We can guarantee that this is the minimum. Unfortunately, this was a simple example and we don't know how to generalize it into a program. With this speed, you can solve half of the problem manually ...

Not sure how much to add because this is a project of Euler's problem, but if you express these metrics in binary you can see this strategy, why we thought the 510 was a simple example, and why we were so sure it couldn't be rolled up to fewer multiplications. And it might be possible to spot some cases in which you cannot achieve more than a binary method.