Problem 60992. find powers of two
find the unique, non-repeating, powers of 2 that sum to a given non-zero integer, n
example:
n = 23
result = [1 2 4 16]
the result does not need to be in any specific order
Solution Stats
Problem Comments
-
1 Comment
Christian Schröder
on 27 Aug 2025 at 20:40
Good problem!
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
-
7 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!