Representing integers as linear combinations of powers