Cody

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

Solution 1134285

Submitted on 6 Mar 2017 by nag
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))

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

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

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

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

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

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

8   Pass
x = 15; y_correct = 536887296; assert(isequal(your_fcn_name(x),y_correct))
{"ft_lang_label":"__label__en","ft_lang_prob":0.57806176,"math_prob":0.99873513,"size":970,"snap":"2020-10-2020-16","text_gpt3_token_len":324,"char_repetition_ratio":0.21532091,"word_repetition_ratio":0.0,"special_character_ratio":0.36597937,"punctuation_ratio":0.15789473,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9979791,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-03-31T20:51:04Z\",\"WARC-Record-ID\":\"<urn:uuid:ec36676f-790a-4c04-8ff5-512bb35574eb>\",\"Content-Length\":\"74681\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d50c83e3-0b94-4a66-a994-0f8859321d6f>\",\"WARC-Concurrent-To\":\"<urn:uuid:57f644b2-6c7f-4eea-8f94-4c8b961ad34c>\",\"WARC-IP-Address\":\"104.110.193.39\",\"WARC-Target-URI\":\"https://de.mathworks.com/matlabcentral/cody/problems/3015-sum-all-integers-from-1-to-2-x/solutions/1134285\",\"WARC-Payload-Digest\":\"sha1:X7ZVBFVILDM5BEXBPK5QNXZAQXSGRB72\",\"WARC-Block-Digest\":\"sha1:UUFQ4C5MCXUQ5RUAOUSCHYRNT2UG4SPQ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370503664.38_warc_CC-MAIN-20200331181930-20200331211930-00547.warc.gz\"}"}