Cody

# Problem 2579. Sum of series V

Solution 1940716

Submitted on 18 Sep 2019 by Ngo Minh Ngoc
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 = 0 a = 2 s = 2

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

s = 0 a = 2 s = 2 a = 6 s = 8 a = 12 s = 20

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

s = 0 a = 2 s = 2 a = 6 s = 8 a = 12 s = 20 a = 20 s = 40

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

s = 0 a = 2 s = 2 a = 6 s = 8 a = 12 s = 20 a = 20 s = 40 a = 30 s = 70 a = 42 s = 112 a = 56 s = 168 a = 72 s = 240 a = 90 s = 330 a = 110 s = 440

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

s = 0 a = 2 s = 2 a = 6 s = 8 a = 12 s = 20 a = 20 s = 40 a = 30 s = 70 a = 42 s = 112 a = 56 s = 168 a = 72 s = 240 a = 90 s = 330 a = 110 s = 440 a = 132 s = 572 a = 156 s = 728 a = 182 s = 910 a = 210 s = 1120 a = 240 s = 1360 a = 272 s = 1632 a = 306 s = 1938 a = 342 s = 2280 a = 380 s = 2660 a = 420 s = 3080 a = 462 s = 3542

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

s = 0 a = 2 s = 2 a = 6 s = 8 a = 12 s = 20 a = 20 s = 40 a = 30 s = 70 a = 42 s = 112 a = 56 s = 168 a = 72 s = 240 a = 90 s = 330 a = 110 s = 440 a = 132 s = 572 a = 156 s = 728 a = 182 s = 910 a = 210 s = 1120 a = 240 s = 1360 a = 272 s = 1632 a = 306 s = 1938 a = 342 s = 2280 a = 380 s = 2660 a = 420 s = 3080 a = 462 s = 3542 a = 506 s = 4048 a = 552 s = 4600 a = 600 s = 5200 a = 650 s = 5850 a = 702 s = 6552 a = 756 s = 7308 a = 812 s = 8120 a = 870 s = 8990 a = 930 s = 9920 a = 992 s = 10912 a = 1056 s = 11968 a = 1122 s = 13090 a = 1190 s = 14280 a = 1260 s = 15540 a = 1332 s = 16872 a = 1406 s = 18278 a = 1482 s = 19760 a = 1560 s = 21320 a = 1640 s = 22960 a = 1722 s = 24682 a = 1806 s = 26488

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

s = 0 a = 2 s = 2 a = 6 s = 8 a = 12 s = 20 a = 20 s = 40 a = 30 s = 70 a = 42 s = 112 a = 56 s = 168 a = 72 s = 240 a = 90 s = 330 a = 110 s = 440 a = 132 s = 572 a = 156 s = 728 a = 182 s = 910 a = 210 s = 1120 a = 240 s = 1360 a = 272 s = 1632 a = 306 s = 1938 a = 342 s = 2280 a = 380 s = 2660 a = 420 s = 3080 a = 462 s = 3542 a = 506 s = 4048 a = 552 s = 4600 a = 600 s = 5200 a = 650 s = 5850 a = 702 s = 6552 a = 756 s = 7308 a = 812 s = 8120 a = 870 s = 8990 a = 930 s = 9920 a = 992 s = 10912 a = 1056 s = 11968 a = 1122 s = 13090 a = 1190 s = 14280 a = 1260 s = 15540 a = 1332 s = 16872 a = 1406 s = 18278 a = 1482 s = 19760 a = 1560 s = 21320 a = 1640 s = 22960 a = 1722 s = 24682 a = 1806 s = 26488 a = 1892 s = 28380 a = 1980 s = 30360 a = 2070 s = 32430 a = 2162 s = 34592 a = 2256 s = 36848 a = 2352 s = 39200 a = 2450 s = 41650 a = 2550 s = 44200 a = 2652 s = 46852 a = 2756 s = 49608 a = 2862 s = 52470 a = 2970 s = 55440 a = 3080 s = 58520 a = 3192 s = 61712 a = 3306 s = 65018 a = 3422 s = 68440 a = 3540 s = 71980 a = 3660 s = 75640 a = 3782 s = 79422 a = 3906 s = 83328 a = 4032 s = 87360 a = 4160 s = 91520 a = 4290 s = 95810 a = 4422 s = 100232 a = 4556 s = 104788 a = 4692 s = 109480 a = 4830 s = 114310 a = 4970 s = 119280 a = 5112 s = 124392 a = 5256 s = 129648 a = 5402 s = 135050 a = 5550 s = 140600 a = 5700 s = 146300 a = 5852 s = 152152 a = 6006 s = 158158 a = 6162 s = 164320 a = 6320 s = 170640 a = 6480 s = 177120 a = 6642 s = 183762 a = 6806 s = 190568 a = 6972 s = 197540 a = 7140 s = 204680 a = 7310 s = 211990 a = 7482 s = 219472 a = 7656 s = 227128 a = 7832 s = 234960

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

s = 0 a = 2 s = 2 a = 6 s = 8 a = 12 s = 20 a = 20 s = 40 a = 30 s = 70 a = 42 s = 112 a = 56 s = 168 a = 72 s = 240 a = 90 s = 330 a = 110 s = 440 a = 132 s = 572 a = 156 s = 728 a = 182 s = 910 a = 210 s = 1120 a = 240 s = 1360 a = 272 s = 1632 a = 306 s = 1938 a = 342 s = 2280 a = 380 s = 2660 a = 420 s = 3080 a = 462 s = 3542 a = 506 s = 4048 a = 552 s = 4600 a = 600 s = 5200 a = 650 s = 5850 a = 702 s = 6552 a = 756 s = 7308 a = 812 s = 8120 a = 870 s = 8990 a = 930 s = 9920 a = 992 s = 10912 a = 1056 s = 11968 a = 1122 s = 13090 a = 1190 s = 14280 a = 1260 s = 15540 a = 1332 s = 16872 a = 1406 s = 18278 a = 1482 s = 19760 a = 1560 s = 21320 a = 1640 s = 22960 a = 1722 s = 24682 a = 1806 s = 26488 a = 1892 s = 28380 a = 1980 s = 30360 a = 2070 s = 32430 a = 2162 s = 34592 a = 2256 s = 36848 a = 2352 s = 39200 a = 2450 s = 41650 a = 2550 s = 44200 a = 2652 s = 46852 a = 2756 s = 49608 a = 2862 s = 52470 a = 2970 s = 55440 a = 3080 s = 58520 a = 3192 s = 61712 a = 3306 s = 65018 a = 3422 s = 68440 a = 3540 s = 71980 a = 3660 s = 75640 a = 3782 s = 79422 a = 3906 s = 83328 a = 4032 s = 87360 a = 4160 s = 91520 a = 4290 s = 95810 a = 4422 s = 100232 a = 4556 s = 104788 a = 4692 s = 109480 a = 4830 s = 114310 a = 4970 s = 119280 a = 5112 s = 124392 a = 5256 s = 129648 a = 5402 s = 135050 a = 5550 s = 140600 a = 5700 s = 146300 a = 5852 s = 152152 a = 6006 s = 158158 a = 6162 s = 164320 a = 6320 s = 170640 a = 6480 s = 177120 a = 6642 s = 183762 a = 6806 s = 190568 a = 6972 s = 197540 a = 7140 s = 204680 a = 7310 s = 211990 a = 7482 s = 219472 a = 7656 s = 227128 a = 7832 s = 234960 a = 8010 s = 242970 a = 8190 s = 251160 a = 8372 s = 259532 a = 8556 s = 268088 a = 8742 s = 276830 a = 8930 s = 285760 a = 9120 s = 294880 a = 9312 s = 304192 a = 9506 s = 313698 a = 9702 s = 323400 a = 9900 s = 333300