Cody

# Problem 189. Sum all integers from 1 to 2^n

Solution 1945492

Submitted on 22 Sep 2019 at 11:41 by Vu Thanh Nam
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 = 3; y_correct = 36; assert(isequal(sum_int(x),y_correct))

t = 0 t = 1 t = 3 t = 6 t = 10 t = 15 t = 21 t = 28 t = 36 y = 36

2   Pass
x = 7; y_correct = 8256; assert(isequal(sum_int(x),y_correct))

t = 0 t = 1 t = 3 t = 6 t = 10 t = 15 t = 21 t = 28 t = 36 t = 45 t = 55 t = 66 t = 78 t = 91 t = 105 t = 120 t = 136 t = 153 t = 171 t = 190 t = 210 t = 231 t = 253 t = 276 t = 300 t = 325 t = 351 t = 378 t = 406 t = 435 t = 465 t = 496 t = 528 t = 561 t = 595 t = 630 t = 666 t = 703 t = 741 t = 780 t = 820 t = 861 t = 903 t = 946 t = 990 t = 1035 t = 1081 t = 1128 t = 1176 t = 1225 t = 1275 t = 1326 t = 1378 t = 1431 t = 1485 t = 1540 t = 1596 t = 1653 t = 1711 t = 1770 t = 1830 t = 1891 t = 1953 t = 2016 t = 2080 t = 2145 t = 2211 t = 2278 t = 2346 t = 2415 t = 2485 t = 2556 t = 2628 t = 2701 t = 2775 t = 2850 t = 2926 t = 3003 t = 3081 t = 3160 t = 3240 t = 3321 t = 3403 t = 3486 t = 3570 t = 3655 t = 3741 t = 3828 t = 3916 t = 4005 t = 4095 t = 4186 t = 4278 t = 4371 t = 4465 t = 4560 t = 4656 t = 4753 t = 4851 t = 4950 t = 5050 t = 5151 t = 5253 t = 5356 t = 5460 t = 5565 t = 5671 t = 5778 t = 5886 t = 5995 t = 6105 t = 6216 t = 6328 t = 6441 t = 6555 t = 6670 t = 6786 t = 6903 t = 7021 t = 7140 t = 7260 t = 7381 t = 7503 t = 7626 t = 7750 t = 7875 t = 8001 t = 8128 t = 8256 y = 8256

3   Pass
x = 10; y_correct = 524800; assert(isequal(sum_int(x),y_correct))

t = 0 t = 1 t = 3 t = 6 t = 10 t = 15 t = 21 t = 28 t = 36 t = 45 t = 55 t = 66 t = 78 t = 91 t = 105 t = 120 t = 136 t = 153 t = 171 t = 190 t = 210 t = 231 t = 253 t = 276 t = 300 t = 325 t = 351 t = 378 t = 406 t = 435 t = 465 t = 496 t = 528 t = 561 t = 595 t = 630 t = 666 t = 703 t = 741 t = 780 t = 820 t = 861 t = 903 t = 946 t = 990 t = 1035 t = 1081 t = 1128 t = 1176 t = 1225 t = 1275 t = 1326 t = 1378 t = 1431 t = 1485 t = 1540 t = 1596 t = 1653 t = 1711 t = 1770 t = 1830 t = 1891 t = 1953 t = 2016 t = 2080 t = 2145 t = 2211 t = 2278 t = 2346 t = 2415 t = 2485 t = 2556 t = 2628 t = 2701 t = 2775 t = 2850 t = 2926 t = 3003 t = 3081 t = 3160 t = 3240 t = 3321 t = 3403 t = 3486 t = 3570 t = 3655 t = 3741 t = 3828 t = 3916 t = 4005 t = 4095 t = 4186 t = 4278 t = 4371 t = 4465 t = 4560 t = 4656 t = 4753 t = 4851 t = 4950 t = 5050 t = 5151 t = 5253 t = 5356 t = 5460 t = 5565 t = 5671 t = 5778 t = 5886 t = 5995 t = 6105 t = 6216 t = 6328 t = 6441 t = 6555 t = 6670 t = 6786 t = 6903 t = 7021 t = 7140 t = 7260 t = 7381 t = 7503 t = 7626 t = 7750 t = 7875 t = 8001 t = 8128 t = 8256 t = 8385 t = 8515 t = 8646 t = 8778 t = 8911 t = 9045 t = 9180 t = 9316 t = 9453 t = 9591 t = 9730 t = 9870 t = 10011 t = 10153 t = 10296 t = 10440 t = 10585 t = 10731 t = 10878 t = 11026 t = 11175 t = 11325 t = 11476 t = 11628 t = 11781 t = 11935 t = 12090 t = 12246 t = 12403 t = 12561 t = 12720 t = 12880 t = 13041 t = 13203 t = 13366 t = 13530 t = 13695 t = 13861 t = 14028 t = 14196 t = 14365 t = 14535 t = 14706 t = 14878 t = 15051 t = 15225 t = 15400 t = 15576 t = 15753 t = 15931 t = 16110 t = 16290 t = 16471 t = 16653 t = 16836 t = 17020 t = 17205 t = 17391 t = 17578 t = 17766 t = 17955 t = 18145 t = 18336 t = 18528 t = 18721 t = 18915 t = 19110 t = 19306 t = 19503 t = 19701 t = 19900 t = 20100 t = 20301 t = 20503 t = 20706 t = 20910 t = 21115 t = 21321 t = 21528 t = 21736 t = 21945 t = 22155 t = 22366 t = 22578 t = 22791 t = 23005 t = 23220 t = 23436 t = 23653 t = 23871 t = 24090 t = 24310 t = 24531 t = 24753 t = 24976 t = 25200 t = 25425 t = 25651 t = 25878 t = 26106 t = 26335 t = 26565 t = 26796 t = 27028 t = 27261 t = 27495 t = 27730 t = 27966 t = 28203 t = 28441 t = 28680 t = 28920 t = 29161 t = 29403 t = 29646 t = 29890 t = 30135 t = 30381 t = 30628 t = 30876 t = 31125 t = 31375 t = 31626 t = 31878 t = 32131 t = 32385 t = 32640 t = 32896 t = 33153 t = 33411 t = 33670 t = 33930 t = 34191 t = 34453 t = 34716 t = 34980 t = 35245 t = 35511 t = 35778 t = 36046 t = 36315 t = 36585 t = 36856 t = 37128 t = 37401 t = 37675 t = 37950 t = 38226 t = 38503 t = 38781 t = 39060 t = 39340 t = 39621 t = 39903 t = 40186 t = 40470 t = 40755 t = 41041 t = 41328 t = 41616 t = 41905 t = 42195 t = 42486 t = 42778 t = 43071 t = 43365 t = 43660 t = 43956 t = 44253 t = 44551 t = 44850 t = 45150 t = 45451 t = 45753 t = 46056 t = 46360 t = 46665 t = 46971 t = 47278 t = 47586 t = 47895 t = 48205 t = 48516 t = 48828 t = 49141 t = 49455 t = 49770 t = 50086 t = 50403 t = 50721 t = 51040 t = 51360 t = 51681 t = 52003 t = 52326 t = 52650 t = 52975 t = 53301 t = 53628 t = 53956 t = 54285 t = 54615 t = 54946 t = 55278 t = 55611 t = 55945 t = 56280 t = 56616 t = 56953 t = 57291 t = 57630 t = 57970 t = 58311 t = 58653 t = 58996 t = 59340 t = 59685 t = 60031 t = 60378 t = 60726 t = 61075 t = 61425 t = 61776 t = 62128 t = 62481 t = 62835 t = 63190 t = 63546 t = 63903 t = 64261 t = 64620 t = 64980 t = 65341 t = 65703 t = 66066 t = 66430 t = 66795 t = 67161 t = 67528 t = 67896 t = 68265 t = 68635 t = 69006 t = 69378 t = 69751 t = 70125 t = 70500 t = 70876 t = 71253 t = 71631 t = 72010 t = 72390 t = 72771 t = 73153 t = 73536 t = 73920 t = 74305 t = 74691 t = 75078 t = 75466 t = 75855 t = 76245 t = 76636 t = 77028 t = 77421 t = 77815 t = 78210 t = 78606 t = 79003 t = 79401 t = 79800 t = 80200 t = 80601 t = 81003 t = 81406 t = 81810 t = 82215 t = 82621 t = 83028 t = 83436 t = 83845 t = 84255 t = 84666 t = 85078 t = 85491 t = 85905 t = 86320 t = 86736 t = 87153 t = 87571 t = 87990 t = 88410 t = 88831 t = 89253 t = 89676 t = 90100 t = 90525 t = 90951 t = 91378 t = 91806 t = 92235 t = 92665 t = 93096 t = 93528 t = 93961 t = 94395 t = 94830 t = 95266 t = 95703 t = 96141 t = 96580 t = 97020 t = 97461 t = 97903 t = 98346 t = 98790 t = 99235 t = 99681 t = 100128 t = 100576 t = 101025 t = 101475 t = 101926 t = 102378 t = 102831 t = 103285 t = 103740 t = 104196 t = 104653 t = 105111 t = 105570 t = 106030 t = 106491 t = 106953 t = 107416 t = 107880 t = 108345 t = 108811 t = 109278 t = 109746 t = 110215 t = 110685 t = 111156 t = 111628 t = 112101 t = 112575 t = 113050 t = 113526 t = 114003 t = 114481 t = 114960 t = 115440 t = 115921 t = 116403 t = 116886 t = 117370 t = 117855 t = 118341 t = 118828 t = 119316 t = 119805 t = 120295 t = 120786 t = 121278 t = 121771 t = 122265 t = 122760 t = 123256 t = 123753 t = 124251 t = 124750 t = 125250 t = 125751 t = 126253 t = 126756 t = 127260 t = 127765 t = 128271 t = 128778 t = 129286 t = 129795 t = 130305 t = 130816 t = 131328 t = ...

4   Pass
x = 11; y_correct = 2098176; assert(isequal(sum_int(x),y_correct))

t = 0 t = 1 t = 3 t = 6 t = 10 t = 15 t = 21 t = 28 t = 36 t = 45 t = 55 t = 66 t = 78 t = 91 t = 105 t = 120 t = 136 t = 153 t = 171 t = 190 t = 210 t = 231 t = 253 t = 276 t = 300 t = 325 t = 351 t = 378 t = 406 t = 435 t = 465 t = 496 t = 528 t = 561 t = 595 t = 630 t = 666 t = 703 t = 741 t = 780 t = 820 t = 861 t = 903 t = 946 t = 990 t = 1035 t = 1081 t = 1128 t = 1176 t = 1225 t = 1275 t = 1326 t = 1378 t = 1431 t = 1485 t = 1540 t = 1596 t = 1653 t = 1711 t = 1770 t = 1830 t = 1891 t = 1953 t = 2016 t = 2080 t = 2145 t = 2211 t = 2278 t = 2346 t = 2415 t = 2485 t = 2556 t = 2628 t = 2701 t = 2775 t = 2850 t = 2926 t = 3003 t = 3081 t = 3160 t = 3240 t = 3321 t = 3403 t = 3486 t = 3570 t = 3655 t = 3741 t = 3828 t = 3916 t = 4005 t = 4095 t = 4186 t = 4278 t = 4371 t = 4465 t = 4560 t = 4656 t = 4753 t = 4851 t = 4950 t = 5050 t = 5151 t = 5253 t = 5356 t = 5460 t = 5565 t = 5671 t = 5778 t = 5886 t = 5995 t = 6105 t = 6216 t = 6328 t = 6441 t = 6555 t = 6670 t = 6786 t = 6903 t = 7021 t = 7140 t = 7260 t = 7381 t = 7503 t = 7626 t = 7750 t = 7875 t = 8001 t = 8128 t = 8256 t = 8385 t = 8515 t = 8646 t = 8778 t = 8911 t = 9045 t = 9180 t = 9316 t = 9453 t = 9591 t = 9730 t = 9870 t = 10011 t = 10153 t = 10296 t = 10440 t = 10585 t = 10731 t = 10878 t = 11026 t = 11175 t = 11325 t = 11476 t = 11628 t = 11781 t = 11935 t = 12090 t = 12246 t = 12403 t = 12561 t = 12720 t = 12880 t = 13041 t = 13203 t = 13366 t = 13530 t = 13695 t = 13861 t = 14028 t = 14196 t = 14365 t = 14535 t = 14706 t = 14878 t = 15051 t = 15225 t = 15400 t = 15576 t = 15753 t = 15931 t = 16110 t = 16290 t = 16471 t = 16653 t = 16836 t = 17020 t = 17205 t = 17391 t = 17578 t = 17766 t = 17955 t = 18145 t = 18336 t = 18528 t = 18721 t = 18915 t = 19110 t = 19306 t = 19503 t = 19701 t = 19900 t = 20100 t = 20301 t = 20503 t = 20706 t = 20910 t = 21115 t = 21321 t = 21528 t = 21736 t = 21945 t = 22155 t = 22366 t = 22578 t = 22791 t = 23005 t = 23220 t = 23436 t = 23653 t = 23871 t = 24090 t = 24310 t = 24531 t = 24753 t = 24976 t = 25200 t = 25425 t = 25651 t = 25878 t = 26106 t = 26335 t = 26565 t = 26796 t = 27028 t = 27261 t = 27495 t = 27730 t = 27966 t = 28203 t = 28441 t = 28680 t = 28920 t = 29161 t = 29403 t = 29646 t = 29890 t = 30135 t = 30381 t = 30628 t = 30876 t = 31125 t = 31375 t = 31626 t = 31878 t = 32131 t = 32385 t = 32640 t = 32896 t = 33153 t = 33411 t = 33670 t = 33930 t = 34191 t = 34453 t = 34716 t = 34980 t = 35245 t = 35511 t = 35778 t = 36046 t = 36315 t = 36585 t = 36856 t = 37128 t = 37401 t = 37675 t = 37950 t = 38226 t = 38503 t = 38781 t = 39060 t = 39340 t = 39621 t = 39903 t = 40186 t = 40470 t = 40755 t = 41041 t = 41328 t = 41616 t = 41905 t = 42195 t = 42486 t = 42778 t = 43071 t = 43365 t = 43660 t = 43956 t = 44253 t = 44551 t = 44850 t = 45150 t = 45451 t = 45753 t = 46056 t = 46360 t = 46665 t = 46971 t = 47278 t = 47586 t = 47895 t = 48205 t = 48516 t = 48828 t = 49141 t = 49455 t = 49770 t = 50086 t = 50403 t = 50721 t = 51040 t = 51360 t = 51681 t = 52003 t = 52326 t = 52650 t = 52975 t = 53301 t = 53628 t = 53956 t = 54285 t = 54615 t = 54946 t = 55278 t = 55611 t = 55945 t = 56280 t = 56616 t = 56953 t = 57291 t = 57630 t = 57970 t = 58311 t = 58653 t = 58996 t = 59340 t = 59685 t = 60031 t = 60378 t = 60726 t = 61075 t = 61425 t = 61776 t = 62128 t = 62481 t = 62835 t = 63190 t = 63546 t = 63903 t = 64261 t = 64620 t = 64980 t = 65341 t = 65703 t = 66066 t = 66430 t = 66795 t = 67161 t = 67528 t = 67896 t = 68265 t = 68635 t = 69006 t = 69378 t = 69751 t = 70125 t = 70500 t = 70876 t = 71253 t = 71631 t = 72010 t = 72390 t = 72771 t = 73153 t = 73536 t = 73920 t = 74305 t = 74691 t = 75078 t = 75466 t = 75855 t = 76245 t = 76636 t = 77028 t = 77421 t = 77815 t = 78210 t = 78606 t = 79003 t = 79401 t = 79800 t = 80200 t = 80601 t = 81003 t = 81406 t = 81810 t = 82215 t = 82621 t = 83028 t = 83436 t = 83845 t = 84255 t = 84666 t = 85078 t = 85491 t = 85905 t = 86320 t = 86736 t = 87153 t = 87571 t = 87990 t = 88410 t = 88831 t = 89253 t = 89676 t = 90100 t = 90525 t = 90951 t = 91378 t = 91806 t = 92235 t = 92665 t = 93096 t = 93528 t = 93961 t = 94395 t = 94830 t = 95266 t = 95703 t = 96141 t = 96580 t = 97020 t = 97461 t = 97903 t = 98346 t = 98790 t = 99235 t = 99681 t = 100128 t = 100576 t = 101025 t = 101475 t = 101926 t = 102378 t = 102831 t = 103285 t = 103740 t = 104196 t = 104653 t = 105111 t = 105570 t = 106030 t = 106491 t = 106953 t = 107416 t = 107880 t = 108345 t = 108811 t = 109278 t = 109746 t = 110215 t = 110685 t = 111156 t = 111628 t = 112101 t = 112575 t = 113050 t = 113526 t = 114003 t = 114481 t = 114960 t = 115440 t = 115921 t = 116403 t = 116886 t = 117370 t = 117855 t = 118341 t = 118828 t = 119316 t = 119805 t = 120295 t = 120786 t = 121278 t = 121771 t = 122265 t = 122760 t = 123256 t = 123753 t = 124251 t = 124750 t = 125250 t = 125751 t = 126253 t = 126756 t = 127260 t = 127765 t = 128271 t = 128778 t = 129286 t = 129795 t = 130305 t = 130816 t = 131328 t = ...

5   Pass
x = 14; y_correct = 134225920; assert(isequal(sum_int(x),y_correct))

t = 0 t = 1 t = 3 t = 6 t = 10 t = 15 t = 21 t = 28 t = 36 t = 45 t = 55 t = 66 t = 78 t = 91 t = 105 t = 120 t = 136 t = 153 t = 171 t = 190 t = 210 t = 231 t = 253 t = 276 t = 300 t = 325 t = 351 t = 378 t = 406 t = 435 t = 465 t = 496 t = 528 t = 561 t = 595 t = 630 t = 666 t = 703 t = 741 t = 780 t = 820 t = 861 t = 903 t = 946 t = 990 t = 1035 t = 1081 t = 1128 t = 1176 t = 1225 t = 1275 t = 1326 t = 1378 t = 1431 t = 1485 t = 1540 t = 1596 t = 1653 t = 1711 t = 1770 t = 1830 t = 1891 t = 1953 t = 2016 t = 2080 t = 2145 t = 2211 t = 2278 t = 2346 t = 2415 t = 2485 t = 2556 t = 2628 t = 2701 t = 2775 t = 2850 t = 2926 t = 3003 t = 3081 t = 3160 t = 3240 t = 3321 t = 3403 t = 3486 t = 3570 t = 3655 t = 3741 t = 3828 t = 3916 t = 4005 t = 4095 t = 4186 t = 4278 t = 4371 t = 4465 t = 4560 t = 4656 t = 4753 t = 4851 t = 4950 t = 5050 t = 5151 t = 5253 t = 5356 t = 5460 t = 5565 t = 5671 t = 5778 t = 5886 t = 5995 t = 6105 t = 6216 t = 6328 t = 6441 t = 6555 t = 6670 t = 6786 t = 6903 t = 7021 t = 7140 t = 7260 t = 7381 t = 7503 t = 7626 t = 7750 t = 7875 t = 8001 t = 8128 t = 8256 t = 8385 t = 8515 t = 8646 t = 8778 t = 8911 t = 9045 t = 9180 t = 9316 t = 9453 t = 9591 t = 9730 t = 9870 t = 10011 t = 10153 t = 10296 t = 10440 t = 10585 t = 10731 t = 10878 t = 11026 t = 11175 t = 11325 t = 11476 t = 11628 t = 11781 t = 11935 t = 12090 t = 12246 t = 12403 t = 12561 t = 12720 t = 12880 t = 13041 t = 13203 t = 13366 t = 13530 t = 13695 t = 13861 t = 14028 t = 14196 t = 14365 t = 14535 t = 14706 t = 14878 t = 15051 t = 15225 t = 15400 t = 15576 t = 15753 t = 15931 t = 16110 t = 16290 t = 16471 t = 16653 t = 16836 t = 17020 t = 17205 t = 17391 t = 17578 t = 17766 t = 17955 t = 18145 t = 18336 t = 18528 t = 18721 t = 18915 t = 19110 t = 19306 t = 19503 t = 19701 t = 19900 t = 20100 t = 20301 t = 20503 t = 20706 t = 20910 t = 21115 t = 21321 t = 21528 t = 21736 t = 21945 t = 22155 t = 22366 t = 22578 t = 22791 t = 23005 t = 23220 t = 23436 t = 23653 t = 23871 t = 24090 t = 24310 t = 24531 t = 24753 t = 24976 t = 25200 t = 25425 t = 25651 t = 25878 t = 26106 t = 26335 t = 26565 t = 26796 t = 27028 t = 27261 t = 27495 t = 27730 t = 27966 t = 28203 t = 28441 t = 28680 t = 28920 t = 29161 t = 29403 t = 29646 t = 29890 t = 30135 t = 30381 t = 30628 t = 30876 t = 31125 t = 31375 t = 31626 t = 31878 t = 32131 t = 32385 t = 32640 t = 32896 t = 33153 t = 33411 t = 33670 t = 33930 t = 34191 t = 34453 t = 34716 t = 34980 t = 35245 t = 35511 t = 35778 t = 36046 t = 36315 t = 36585 t = 36856 t = 37128 t = 37401 t = 37675 t = 37950 t = 38226 t = 38503 t = 38781 t = 39060 t = 39340 t = 39621 t = 39903 t = 40186 t = 40470 t = 40755 t = 41041 t = 41328 t = 41616 t = 41905 t = 42195 t = 42486 t = 42778 t = 43071 t = 43365 t = 43660 t = 43956 t = 44253 t = 44551 t = 44850 t = 45150 t = 45451 t = 45753 t = 46056 t = 46360 t = 46665 t = 46971 t = 47278 t = 47586 t = 47895 t = 48205 t = 48516 t = 48828 t = 49141 t = 49455 t = 49770 t = 50086 t = 50403 t = 50721 t = 51040 t = 51360 t = 51681 t = 52003 t = 52326 t = 52650 t = 52975 t = 53301 t = 53628 t = 53956 t = 54285 t = 54615 t = 54946 t = 55278 t = 55611 t = 55945 t = 56280 t = 56616 t = 56953 t = 57291 t = 57630 t = 57970 t = 58311 t = 58653 t = 58996 t = 59340 t = 59685 t = 60031 t = 60378 t = 60726 t = 61075 t = 61425 t = 61776 t = 62128 t = 62481 t = 62835 t = 63190 t = 63546 t = 63903 t = 64261 t = 64620 t = 64980 t = 65341 t = 65703 t = 66066 t = 66430 t = 66795 t = 67161 t = 67528 t = 67896 t = 68265 t = 68635 t = 69006 t = 69378 t = 69751 t = 70125 t = 70500 t = 70876 t = 71253 t = 71631 t = 72010 t = 72390 t = 72771 t = 73153 t = 73536 t = 73920 t = 74305 t = 74691 t = 75078 t = 75466 t = 75855 t = 76245 t = 76636 t = 77028 t = 77421 t = 77815 t = 78210 t = 78606 t = 79003 t = 79401 t = 79800 t = 80200 t = 80601 t = 81003 t = 81406 t = 81810 t = 82215 t = 82621 t = 83028 t = 83436 t = 83845 t = 84255 t = 84666 t = 85078 t = 85491 t = 85905 t = 86320 t = 86736 t = 87153 t = 87571 t = 87990 t = 88410 t = 88831 t = 89253 t = 89676 t = 90100 t = 90525 t = 90951 t = 91378 t = 91806 t = 92235 t = 92665 t = 93096 t = 93528 t = 93961 t = 94395 t = 94830 t = 95266 t = 95703 t = 96141 t = 96580 t = 97020 t = 97461 t = 97903 t = 98346 t = 98790 t = 99235 t = 99681 t = 100128 t = 100576 t = 101025 t = 101475 t = 101926 t = 102378 t = 102831 t = 103285 t = 103740 t = 104196 t = 104653 t = 105111 t = 105570 t = 106030 t = 106491 t = 106953 t = 107416 t = 107880 t = 108345 t = 108811 t = 109278 t = 109746 t = 110215 t = 110685 t = 111156 t = 111628 t = 112101 t = 112575 t = 113050 t = 113526 t = 114003 t = 114481 t = 114960 t = 115440 t = 115921 t = 116403 t = 116886 t = 117370 t = 117855 t = 118341 t = 118828 t = 119316 t = 119805 t = 120295 t = 120786 t = 121278 t = 121771 t = 122265 t = 122760 t = 123256 t = 123753 t = 124251 t = 124750 t = 125250 t = 125751 t = 126253 t = 126756 t = 127260 t = 127765 t = 128271 t = 128778 t = 129286 t = 129795 t = 130305 t = 130816 t = 131328 t = ...

6   Pass
x = 17; y_correct = 8590000128; assert(isequal(sum_int(x),y_correct))

t = 0 t = 1 t = 3 t = 6 t = 10 t = 15 t = 21 t = 28 t = 36 t = 45 t = 55 t = 66 t = 78 t = 91 t = 105 t = 120 t = 136 t = 153 t = 171 t = 190 t = 210 t = 231 t = 253 t = 276 t = 300 t = 325 t = 351 t = 378 t = 406 t = 435 t = 465 t = 496 t = 528 t = 561 t = 595 t = 630 t = 666 t = 703 t = 741 t = 780 t = 820 t = 861 t = 903 t = 946 t = 990 t = 1035 t = 1081 t = 1128 t = 1176 t = 1225 t = 1275 t = 1326 t = 1378 t = 1431 t = 1485 t = 1540 t = 1596 t = 1653 t = 1711 t = 1770 t = 1830 t = 1891 t = 1953 t = 2016 t = 2080 t = 2145 t = 2211 t = 2278 t = 2346 t = 2415 t = 2485 t = 2556 t = 2628 t = 2701 t = 2775 t = 2850 t = 2926 t = 3003 t = 3081 t = 3160 t = 3240 t = 3321 t = 3403 t = 3486 t = 3570 t = 3655 t = 3741 t = 3828 t = 3916 t = 4005 t = 4095 t = 4186 t = 4278 t = 4371 t = 4465 t = 4560 t = 4656 t = 4753 t = 4851 t = 4950 t = 5050 t = 5151 t = 5253 t = 5356 t = 5460 t = 5565 t = 5671 t = 5778 t = 5886 t = 5995 t = 6105 t = 6216 t = 6328 t = 6441 t = 6555 t = 6670 t = 6786 t = 6903 t = 7021 t = 7140 t = 7260 t = 7381 t = 7503 t = 7626 t = 7750 t = 7875 t = 8001 t = 8128 t = 8256 t = 8385 t = 8515 t = 8646 t = 8778 t = 8911 t = 9045 t = 9180 t = 9316 t = 9453 t = 9591 t = 9730 t = 9870 t = 10011 t = 10153 t = 10296 t = 10440 t = 10585 t = 10731 t = 10878 t = 11026 t = 11175 t = 11325 t = 11476 t = 11628 t = 11781 t = 11935 t = 12090 t = 12246 t = 12403 t = 12561 t = 12720 t = 12880 t = 13041 t = 13203 t = 13366 t = 13530 t = 13695 t = 13861 t = 14028 t = 14196 t = 14365 t = 14535 t = 14706 t = 14878 t = 15051 t = 15225 t = 15400 t = 15576 t = 15753 t = 15931 t = 16110 t = 16290 t = 16471 t = 16653 t = 16836 t = 17020 t = 17205 t = 17391 t = 17578 t = 17766 t = 17955 t = 18145 t = 18336 t = 18528 t = 18721 t = 18915 t = 19110 t = 19306 t = 19503 t = 19701 t = 19900 t = 20100 t = 20301 t = 20503 t = 20706 t = 20910 t = 21115 t = 21321 t = 21528 t = 21736 t = 21945 t = 22155 t = 22366 t = 22578 t = 22791 t = 23005 t = 23220 t = 23436 t = 23653 t = 23871 t = 24090 t = 24310 t = 24531 t = 24753 t = 24976 t = 25200 t = 25425 t = 25651 t = 25878 t = 26106 t = 26335 t = 26565 t = 26796 t = 27028 t = 27261 t = 27495 t = 27730 t = 27966 t = 28203 t = 28441 t = 28680 t = 28920 t = 29161 t = 29403 t = 29646 t = 29890 t = 30135 t = 30381 t = 30628 t = 30876 t = 31125 t = 31375 t = 31626 t = 31878 t = 32131 t = 32385 t = 32640 t = 32896 t = 33153 t = 33411 t = 33670 t = 33930 t = 34191 t = 34453 t = 34716 t = 34980 t = 35245 t = 35511 t = 35778 t = 36046 t = 36315 t = 36585 t = 36856 t = 37128 t = 37401 t = 37675 t = 37950 t = 38226 t = 38503 t = 38781 t = 39060 t = 39340 t = 39621 t = 39903 t = 40186 t = 40470 t = 40755 t = 41041 t = 41328 t = 41616 t = 41905 t = 42195 t = 42486 t = 42778 t = 43071 t = 43365 t = 43660 t = 43956 t = 44253 t = 44551 t = 44850 t = 45150 t = 45451 t = 45753 t = 46056 t = 46360 t = 46665 t = 46971 t = 47278 t = 47586 t = 47895 t = 48205 t = 48516 t = 48828 t = 49141 t = 49455 t = 49770 t = 50086 t = 50403 t = 50721 t = 51040 t = 51360 t = 51681 t = 52003 t = 52326 t = 52650 t = 52975 t = 53301 t = 53628 t = 53956 t = 54285 t = 54615 t = 54946 t = 55278 t = 55611 t = 55945 t = 56280 t = 56616 t = 56953 t = 57291 t = 57630 t = 57970 t = 58311 t = 58653 t = 58996 t = 59340 t = 59685 t = 60031 t = 60378 t = 60726 t = 61075 t = 61425 t = 61776 t = 62128 t = 62481 t = 62835 t = 63190 t = 63546 t = 63903 t = 64261 t = 64620 t = 64980 t = 65341 t = 65703 t = 66066 t = 66430 t = 66795 t = 67161 t = 67528 t = 67896 t = 68265 t = 68635 t = 69006 t = 69378 t = 69751 t = 70125 t = 70500 t = 70876 t = 71253 t = 71631 t = 72010 t = 72390 t = 72771 t = 73153 t = 73536 t = 73920 t = 74305 t = 74691 t = 75078 t = 75466 t = 75855 t = 76245 t = 76636 t = 77028 t = 77421 t = 77815 t = 78210 t = 78606 t = 79003 t = 79401 t = 79800 t = 80200 t = 80601 t = 81003 t = 81406 t = 81810 t = 82215 t = 82621 t = 83028 t = 83436 t = 83845 t = 84255 t = 84666 t = 85078 t = 85491 t = 85905 t = 86320 t = 86736 t = 87153 t = 87571 t = 87990 t = 88410 t = 88831 t = 89253 t = 89676 t = 90100 t = 90525 t = 90951 t = 91378 t = 91806 t = 92235 t = 92665 t = 93096 t = 93528 t = 93961 t = 94395 t = 94830 t = 95266 t = 95703 t = 96141 t = 96580 t = 97020 t = 97461 t = 97903 t = 98346 t = 98790 t = 99235 t = 99681 t = 100128 t = 100576 t = 101025 t = 101475 t = 101926 t = 102378 t = 102831 t = 103285 t = 103740 t = 104196 t = 104653 t = 105111 t = 105570 t = 106030 t = 106491 t = 106953 t = 107416 t = 107880 t = 108345 t = 108811 t = 109278 t = 109746 t = 110215 t = 110685 t = 111156 t = 111628 t = 112101 t = 112575 t = 113050 t = 113526 t = 114003 t = 114481 t = 114960 t = 115440 t = 115921 t = 116403 t = 116886 t = 117370 t = 117855 t = 118341 t = 118828 t = 119316 t = 119805 t = 120295 t = 120786 t = 121278 t = 121771 t = 122265 t = 122760 t = 123256 t = 123753 t = 124251 t = 124750 t = 125250 t = 125751 t = 126253 t = 126756 t = 127260 t = 127765 t = 128271 t = 128778 t = 129286 t = 129795 t = 130305 t = 130816 t = 131328 t = ...