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

87.5% Correct | 12.5% Incorrect
Last Solution submitted on Aug 31, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers7

Suggested Problems

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!