Cody

Solution 2384163

Submitted on 26 May 2020 by David K
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
nmax = 10; pmax = 52; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52

2   Pass
nmax = 30; pmax = 9232; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52 pmax = 70 pmax = 106 pmax = 160 pmax = 214 pmax = 322 pmax = 484 pmax = 700 pmax = 790 pmax = 1186 pmax = 1780 pmax = 2158 pmax = 3238 pmax = 4858 pmax = 7288 pmax = 9232

3   Pass
nmax = 100; pmax = 9232; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52 pmax = 70 pmax = 106 pmax = 160 pmax = 214 pmax = 322 pmax = 484 pmax = 700 pmax = 790 pmax = 1186 pmax = 1780 pmax = 2158 pmax = 3238 pmax = 4858 pmax = 7288 pmax = 9232

4   Pass
nmax = 1000; pmax = 250504; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52 pmax = 70 pmax = 106 pmax = 160 pmax = 214 pmax = 322 pmax = 484 pmax = 700 pmax = 790 pmax = 1186 pmax = 1780 pmax = 2158 pmax = 3238 pmax = 4858 pmax = 7288 pmax = 9232 pmax = 13120 pmax = 17224 pmax = 17494 pmax = 26242 pmax = 39364 pmax = 41524 pmax = 45682 pmax = 68524 pmax = 77092 pmax = 97576 pmax = 98962 pmax = 148444 pmax = 167002 pmax = 250504

5   Pass
nmax = 2000; pmax = 1276936; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52 pmax = 70 pmax = 106 pmax = 160 pmax = 214 pmax = 322 pmax = 484 pmax = 700 pmax = 790 pmax = 1186 pmax = 1780 pmax = 2158 pmax = 3238 pmax = 4858 pmax = 7288 pmax = 9232 pmax = 13120 pmax = 17224 pmax = 17494 pmax = 26242 pmax = 39364 pmax = 41524 pmax = 45682 pmax = 68524 pmax = 77092 pmax = 97576 pmax = 98962 pmax = 148444 pmax = 167002 pmax = 250504 pmax = 354292 pmax = 504466 pmax = 756700 pmax = 851290 pmax = 1276936

6   Pass
nmax = 4500; pmax = 6810136; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52 pmax = 70 pmax = 106 pmax = 160 pmax = 214 pmax = 322 pmax = 484 pmax = 700 pmax = 790 pmax = 1186 pmax = 1780 pmax = 2158 pmax = 3238 pmax = 4858 pmax = 7288 pmax = 9232 pmax = 13120 pmax = 17224 pmax = 17494 pmax = 26242 pmax = 39364 pmax = 41524 pmax = 45682 pmax = 68524 pmax = 77092 pmax = 97576 pmax = 98962 pmax = 148444 pmax = 167002 pmax = 250504 pmax = 354292 pmax = 504466 pmax = 756700 pmax = 851290 pmax = 1276936 pmax = 1417174 pmax = 2125762 pmax = 3188644 pmax = 4035634 pmax = 6053452 pmax = 6810136

7   Pass
nmax = 8120; pmax = 8153620; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52 pmax = 70 pmax = 106 pmax = 160 pmax = 214 pmax = 322 pmax = 484 pmax = 700 pmax = 790 pmax = 1186 pmax = 1780 pmax = 2158 pmax = 3238 pmax = 4858 pmax = 7288 pmax = 9232 pmax = 13120 pmax = 17224 pmax = 17494 pmax = 26242 pmax = 39364 pmax = 41524 pmax = 45682 pmax = 68524 pmax = 77092 pmax = 97576 pmax = 98962 pmax = 148444 pmax = 167002 pmax = 250504 pmax = 354292 pmax = 504466 pmax = 756700 pmax = 851290 pmax = 1276936 pmax = 1417174 pmax = 2125762 pmax = 3188644 pmax = 4035634 pmax = 6053452 pmax = 6810136 pmax = 8153620

8   Pass
nmax = 9998; pmax = 27114424; assert(isequal(peakOfPeaks(nmax),pmax))

pmax = 2 pmax = 3 pmax = 10 pmax = 16 pmax = 22 pmax = 34 pmax = 52 pmax = 70 pmax = 106 pmax = 160 pmax = 214 pmax = 322 pmax = 484 pmax = 700 pmax = 790 pmax = 1186 pmax = 1780 pmax = 2158 pmax = 3238 pmax = 4858 pmax = 7288 pmax = 9232 pmax = 13120 pmax = 17224 pmax = 17494 pmax = 26242 pmax = 39364 pmax = 41524 pmax = 45682 pmax = 68524 pmax = 77092 pmax = 97576 pmax = 98962 pmax = 148444 pmax = 167002 pmax = 250504 pmax = 354292 pmax = 504466 pmax = 756700 pmax = 851290 pmax = 1276936 pmax = 1417174 pmax = 2125762 pmax = 3188644 pmax = 4035634 pmax = 6053452 pmax = 6810136 pmax = 8153620 pmax = 12050854 pmax = 18076282 pmax = 27114424