How can extract the individual no from its total sum for below case ?
$$ 2^1+2^3+2^4+2^8+2^{13}+2^{17}=139546 $$
in the above expression i have only value 139546 but no knowledge about no of number in left hand side in this case how can extract the individual numbers like $$ 2^1, 2^3, 2^4, ^8, 2^{13}, 2^{17}$$ from total sum 139546.
Thanks,
Take a look at this. Specifically here is an algorithm for finding it:
Then $$n = \sum_{i=0}^k a_i 2^i$$ so your numbers are precisely the $2^i$ for wich $a_i = 1$.