Problem 189. Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
Solution Stats
Problem Comments
-
23 Comments
Show
20 older comments
DJ Campbell
on 12 May 2023
Nice and easy beginners question using the sum function. Thanks Dimitris!
AMIT SURYAVANSHI
on 21 Jan 2024
The question was easy and yes today only I completed the group Introduction to MATLAB few problems were very easy and few were tough ..... Happy to complete all the questions from this group
Liam
on 7 May 2025
Don't overcomplicate it
Solution Comments
Show commentsProblem Recent Solvers16471
Suggested Problems
-
Sort a list of complex numbers based on far they are from the origin.
5715 Solvers
-
5795 Solvers
-
Find the dimensions of a matrix
541 Solvers
-
What is Sum Of all elements of Matrix
425 Solvers
-
493 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!