Cody

# Problem 3015. Sum all integers from 1 to 2^x

Solution 2056754

Submitted on 13 Dec 2019 by Asif Newaz
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x = 2; y_correct = 10; assert(isequal(your_fcn_name(x),y_correct))

y = 10

2   Pass
x = 3; y_correct = 36; assert(isequal(your_fcn_name(x),y_correct))

y = 36

3   Pass
x = 4; y_correct = 136; assert(isequal(your_fcn_name(x),y_correct))

y = 136

4   Pass
x = 5; y_correct = 528; assert(isequal(your_fcn_name(x),y_correct))

y = 528

5   Pass
x = 6; y_correct = 2080; assert(isequal(your_fcn_name(x),y_correct))

y = 2080

6   Pass
x = 7; y_correct = 8256; assert(isequal(your_fcn_name(x),y_correct))

y = 8256

7   Pass
x = 8; y_correct = 32896; assert(isequal(your_fcn_name(x),y_correct))

y = 32896

8   Pass
x = 15; y_correct = 536887296; assert(isequal(your_fcn_name(x),y_correct))

y = 536887296

### Community Treasure Hunt

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

Start Hunting!