Cody

# Problem 2579. Sum of series V

Solution 2189079

Submitted on 2 Apr 2020 by Yaroslav Br
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
n = 1; s_correct = 2; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2

2   Pass
n = 3; s_correct = 20; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2 s = 8 s = 20

3   Pass
n = 4; s_correct = 40; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2 s = 8 s = 20 s = 40

4   Pass
n = 10; s_correct = 440; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2 s = 8 s = 20 s = 40 s = 70 s = 112 s = 168 s = 240 s = 330 s = 440

5   Pass
n = 21; s_correct = 3542; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2 s = 8 s = 20 s = 40 s = 70 s = 112 s = 168 s = 240 s = 330 s = 440 s = 572 s = 728 s = 910 s = 1120 s = 1360 s = 1632 s = 1938 s = 2280 s = 2660 s = 3080 s = 3542

6   Pass
n = 42; s_correct = 26488; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2 s = 8 s = 20 s = 40 s = 70 s = 112 s = 168 s = 240 s = 330 s = 440 s = 572 s = 728 s = 910 s = 1120 s = 1360 s = 1632 s = 1938 s = 2280 s = 2660 s = 3080 s = 3542 s = 4048 s = 4600 s = 5200 s = 5850 s = 6552 s = 7308 s = 8120 s = 8990 s = 9920 s = 10912 s = 11968 s = 13090 s = 14280 s = 15540 s = 16872 s = 18278 s = 19760 s = 21320 s = 22960 s = 24682 s = 26488

7   Pass
n = 88; s_correct = 234960; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2 s = 8 s = 20 s = 40 s = 70 s = 112 s = 168 s = 240 s = 330 s = 440 s = 572 s = 728 s = 910 s = 1120 s = 1360 s = 1632 s = 1938 s = 2280 s = 2660 s = 3080 s = 3542 s = 4048 s = 4600 s = 5200 s = 5850 s = 6552 s = 7308 s = 8120 s = 8990 s = 9920 s = 10912 s = 11968 s = 13090 s = 14280 s = 15540 s = 16872 s = 18278 s = 19760 s = 21320 s = 22960 s = 24682 s = 26488 s = 28380 s = 30360 s = 32430 s = 34592 s = 36848 s = 39200 s = 41650 s = 44200 s = 46852 s = 49608 s = 52470 s = 55440 s = 58520 s = 61712 s = 65018 s = 68440 s = 71980 s = 75640 s = 79422 s = 83328 s = 87360 s = 91520 s = 95810 s = 100232 s = 104788 s = 109480 s = 114310 s = 119280 s = 124392 s = 129648 s = 135050 s = 140600 s = 146300 s = 152152 s = 158158 s = 164320 s = 170640 s = 177120 s = 183762 s = 190568 s = 197540 s = 204680 s = 211990 s = 219472 s = 227128 s = 234960

8   Pass
n = 99; s_correct = 333300; assert(isequal(sumOfSeriesV(n),s_correct))

s = 2 s = 8 s = 20 s = 40 s = 70 s = 112 s = 168 s = 240 s = 330 s = 440 s = 572 s = 728 s = 910 s = 1120 s = 1360 s = 1632 s = 1938 s = 2280 s = 2660 s = 3080 s = 3542 s = 4048 s = 4600 s = 5200 s = 5850 s = 6552 s = 7308 s = 8120 s = 8990 s = 9920 s = 10912 s = 11968 s = 13090 s = 14280 s = 15540 s = 16872 s = 18278 s = 19760 s = 21320 s = 22960 s = 24682 s = 26488 s = 28380 s = 30360 s = 32430 s = 34592 s = 36848 s = 39200 s = 41650 s = 44200 s = 46852 s = 49608 s = 52470 s = 55440 s = 58520 s = 61712 s = 65018 s = 68440 s = 71980 s = 75640 s = 79422 s = 83328 s = 87360 s = 91520 s = 95810 s = 100232 s = 104788 s = 109480 s = 114310 s = 119280 s = 124392 s = 129648 s = 135050 s = 140600 s = 146300 s = 152152 s = 158158 s = 164320 s = 170640 s = 177120 s = 183762 s = 190568 s = 197540 s = 204680 s = 211990 s = 219472 s = 227128 s = 234960 s = 242970 s = 251160 s = 259532 s = 268088 s = 276830 s = 285760 s = 294880 s = 304192 s = 313698 s = 323400 s = 333300