How to find an equation composed of nothing but integers and of as few digits as possible which equals a specific integer?

50 Views Asked by At

Say I have an integer A, and A has n digits. Say I want want to find an equation which contains as few digits as possible which results in A. Is there a straightforward repeatable way of doing this? Even finding a consistent way of finding very few digits (though maybe not fewest) would be great for now!

Example: 123 = 2^7 - 5, which only takes 3 digits (2, 7 and 5).

One idea is to just observe what grows fastest, and from my very little mathematical experience, exponents fit the bill. That way, if we have a massive number A with billions of digits, the exponent's fast growth means that we could use fewer digits to accomplish this, than say, simply adding numbers or multiplying them.

Now in reality, I would also like to minimize the number of operations, but this may make the problem much harder, so we can ignore that for now.