Breaking up sum of power of 2s
Look at the binary representation of the sum. Each 1 in that representation represents a power of two that has to be included as a summand, either directly or indirectly.

If the number of 1s in that representation is greater than the number of summands, there is no solution, if it is equal, there is exactly one solution, and if it is smaller, things get interesting.

The basic property you'll want to exploit in the last case is that you can represent any power of two as once that power, or twice the next smaller power, or 4 times the one after that and so on.

I think this approach can lead to an efficient algorithm. (But I did not follow it through myself, so no guarantees.)