I have a sequence of positive integers. They were created using geometric progression:initial_valuex (ratio^(nth-1))

For example; ifinitial_value=1,ratio=2, andnthbegins at 1 and increases +1 every iteration; I end up with a sequence of 1,2,4,8,16,32,64,...

If, just for example, three integers from the above sequence were taken at random and added together, lets say they equaled 25(1+8+16).

Given the sum, is there an equation that can give me the integers that were taken?

For my particular situation, I will always have access to theinitial_value, theratio, and thenthsused to create the sequence, the final maximum value of the sequence, and the sum of the integers taken.

Thank you for your time.