Cody

# Problem 69. Find the peak 3n+1 sequence value

Solution 968008

Submitted on 14 Sep 2016 by Lukas
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))

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16

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

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16 input_number = 11 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 12 input_number = 10 input_number = 16 input_number = 13 input_number = 40 input_number = 16 input_number = 14 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 15 input_number = 46 input_number = 70 pmax = 70 input_number = 106 pmax = 106 input_number = 160 pmax = 160 input_number = 16 input_number = 16 input_number = 17 input_number = 52 input_number = 40 input_number = 16 input_number = 18 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 19 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 20 input_number = 16 input_number = 21 input_number = 64 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 23 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 24 input_number = 10 input_number = 16 input_number = 25 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 26 input_number = 40 input_number = 16 input_number = 27 input_number = 82 input_number = 124 input_number = 94 input_number = 142 input_number = 214 pmax = 214 input_number = 322 pmax = 322 input_number = 484 pmax = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 pmax = 700 input_number = 526 input_number = 790 pmax = 790 input_number = 1186 pmax = 1186 input_number = 1780 pmax = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 pmax = 2158 input_number = 3238 pmax = 3238 input_number = 4858 pmax = 4858 input_number = 7288 pmax = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 pmax = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 29 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 30 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16

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

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16 input_number = 11 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 12 input_number = 10 input_number = 16 input_number = 13 input_number = 40 input_number = 16 input_number = 14 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 15 input_number = 46 input_number = 70 pmax = 70 input_number = 106 pmax = 106 input_number = 160 pmax = 160 input_number = 16 input_number = 16 input_number = 17 input_number = 52 input_number = 40 input_number = 16 input_number = 18 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 19 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 20 input_number = 16 input_number = 21 input_number = 64 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 23 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 24 input_number = 10 input_number = 16 input_number = 25 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 26 input_number = 40 input_number = 16 input_number = 27 input_number = 82 input_number = 124 input_number = 94 input_number = 142 input_number = 214 pmax = 214 input_number = 322 pmax = 322 input_number = 484 pmax = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 pmax = 700 input_number = 526 input_number = 790 pmax = 790 input_number = 1186 pmax = 1186 input_number = 1780 pmax = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 pmax = 2158 input_number = 3238 pmax = 3238 input_number = 4858 pmax = 4858 input_number = 7288 pmax = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 pmax = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 29 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 30 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 31 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 32 input_number = 33 input_number = 100 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 35 input_number = 106 input_number = 160 input_number = 16 input_number = 36 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 37 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 38 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 39 input_number = 118 input_number = 178 input_number = 268 input_number = 202 input_number = 304 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 40 input_number = 16 input_number = 41 input_number = 124 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 42 input_number = 64 input_number = 43 input_number = 130 input_number = 196 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 44 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 45 input_number = 136 input_number = 52 input_number = 40 input_number = 16 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 47 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 48 input_number = 10 input_number = 16 input_number = 49 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 50 input_num...

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

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16 input_number = 11 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 12 input_number = 10 input_number = 16 input_number = 13 input_number = 40 input_number = 16 input_number = 14 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 15 input_number = 46 input_number = 70 pmax = 70 input_number = 106 pmax = 106 input_number = 160 pmax = 160 input_number = 16 input_number = 16 input_number = 17 input_number = 52 input_number = 40 input_number = 16 input_number = 18 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 19 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 20 input_number = 16 input_number = 21 input_number = 64 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 23 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 24 input_number = 10 input_number = 16 input_number = 25 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 26 input_number = 40 input_number = 16 input_number = 27 input_number = 82 input_number = 124 input_number = 94 input_number = 142 input_number = 214 pmax = 214 input_number = 322 pmax = 322 input_number = 484 pmax = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 pmax = 700 input_number = 526 input_number = 790 pmax = 790 input_number = 1186 pmax = 1186 input_number = 1780 pmax = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 pmax = 2158 input_number = 3238 pmax = 3238 input_number = 4858 pmax = 4858 input_number = 7288 pmax = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 pmax = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 29 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 30 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 31 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 32 input_number = 33 input_number = 100 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 35 input_number = 106 input_number = 160 input_number = 16 input_number = 36 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 37 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 38 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 39 input_number = 118 input_number = 178 input_number = 268 input_number = 202 input_number = 304 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 40 input_number = 16 input_number = 41 input_number = 124 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 42 input_number = 64 input_number = 43 input_number = 130 input_number = 196 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 44 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 45 input_number = 136 input_number = 52 input_number = 40 input_number = 16 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 47 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 48 input_number = 10 input_number = 16 input_number = 49 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 50 input_num...

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

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16 input_number = 11 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 12 input_number = 10 input_number = 16 input_number = 13 input_number = 40 input_number = 16 input_number = 14 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 15 input_number = 46 input_number = 70 pmax = 70 input_number = 106 pmax = 106 input_number = 160 pmax = 160 input_number = 16 input_number = 16 input_number = 17 input_number = 52 input_number = 40 input_number = 16 input_number = 18 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 19 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 20 input_number = 16 input_number = 21 input_number = 64 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 23 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 24 input_number = 10 input_number = 16 input_number = 25 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 26 input_number = 40 input_number = 16 input_number = 27 input_number = 82 input_number = 124 input_number = 94 input_number = 142 input_number = 214 pmax = 214 input_number = 322 pmax = 322 input_number = 484 pmax = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 pmax = 700 input_number = 526 input_number = 790 pmax = 790 input_number = 1186 pmax = 1186 input_number = 1780 pmax = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 pmax = 2158 input_number = 3238 pmax = 3238 input_number = 4858 pmax = 4858 input_number = 7288 pmax = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 pmax = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 29 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 30 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 31 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 32 input_number = 33 input_number = 100 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 35 input_number = 106 input_number = 160 input_number = 16 input_number = 36 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 37 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 38 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 39 input_number = 118 input_number = 178 input_number = 268 input_number = 202 input_number = 304 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 40 input_number = 16 input_number = 41 input_number = 124 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 42 input_number = 64 input_number = 43 input_number = 130 input_number = 196 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 44 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 45 input_number = 136 input_number = 52 input_number = 40 input_number = 16 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 47 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 48 input_number = 10 input_number = 16 input_number = 49 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 50 input_num...

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

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16 input_number = 11 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 12 input_number = 10 input_number = 16 input_number = 13 input_number = 40 input_number = 16 input_number = 14 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 15 input_number = 46 input_number = 70 pmax = 70 input_number = 106 pmax = 106 input_number = 160 pmax = 160 input_number = 16 input_number = 16 input_number = 17 input_number = 52 input_number = 40 input_number = 16 input_number = 18 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 19 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 20 input_number = 16 input_number = 21 input_number = 64 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 23 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 24 input_number = 10 input_number = 16 input_number = 25 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 26 input_number = 40 input_number = 16 input_number = 27 input_number = 82 input_number = 124 input_number = 94 input_number = 142 input_number = 214 pmax = 214 input_number = 322 pmax = 322 input_number = 484 pmax = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 pmax = 700 input_number = 526 input_number = 790 pmax = 790 input_number = 1186 pmax = 1186 input_number = 1780 pmax = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 pmax = 2158 input_number = 3238 pmax = 3238 input_number = 4858 pmax = 4858 input_number = 7288 pmax = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 pmax = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 29 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 30 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 31 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 32 input_number = 33 input_number = 100 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 35 input_number = 106 input_number = 160 input_number = 16 input_number = 36 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 37 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 38 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 39 input_number = 118 input_number = 178 input_number = 268 input_number = 202 input_number = 304 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 40 input_number = 16 input_number = 41 input_number = 124 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 42 input_number = 64 input_number = 43 input_number = 130 input_number = 196 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 44 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 45 input_number = 136 input_number = 52 input_number = 40 input_number = 16 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 47 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 48 input_number = 10 input_number = 16 input_number = 49 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 50 input_num...

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

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16 input_number = 11 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 12 input_number = 10 input_number = 16 input_number = 13 input_number = 40 input_number = 16 input_number = 14 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 15 input_number = 46 input_number = 70 pmax = 70 input_number = 106 pmax = 106 input_number = 160 pmax = 160 input_number = 16 input_number = 16 input_number = 17 input_number = 52 input_number = 40 input_number = 16 input_number = 18 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 19 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 20 input_number = 16 input_number = 21 input_number = 64 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 23 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 24 input_number = 10 input_number = 16 input_number = 25 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 26 input_number = 40 input_number = 16 input_number = 27 input_number = 82 input_number = 124 input_number = 94 input_number = 142 input_number = 214 pmax = 214 input_number = 322 pmax = 322 input_number = 484 pmax = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 pmax = 700 input_number = 526 input_number = 790 pmax = 790 input_number = 1186 pmax = 1186 input_number = 1780 pmax = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 pmax = 2158 input_number = 3238 pmax = 3238 input_number = 4858 pmax = 4858 input_number = 7288 pmax = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 pmax = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 29 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 30 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 31 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 32 input_number = 33 input_number = 100 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 35 input_number = 106 input_number = 160 input_number = 16 input_number = 36 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 37 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 38 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 39 input_number = 118 input_number = 178 input_number = 268 input_number = 202 input_number = 304 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 40 input_number = 16 input_number = 41 input_number = 124 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 42 input_number = 64 input_number = 43 input_number = 130 input_number = 196 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 44 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 45 input_number = 136 input_number = 52 input_number = 40 input_number = 16 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 47 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 48 input_number = 10 input_number = 16 input_number = 49 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 50 input_num...

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

input_number = 1 input_number = 2 input_number = 3 input_number = 10 pmax = 10 input_number = 16 pmax = 16 input_number = 4 input_number = 5 input_number = 16 input_number = 6 input_number = 10 input_number = 16 input_number = 7 input_number = 22 pmax = 22 input_number = 34 pmax = 34 input_number = 52 pmax = 52 input_number = 40 input_number = 16 input_number = 8 input_number = 9 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 10 input_number = 16 input_number = 11 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 12 input_number = 10 input_number = 16 input_number = 13 input_number = 40 input_number = 16 input_number = 14 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 15 input_number = 46 input_number = 70 pmax = 70 input_number = 106 pmax = 106 input_number = 160 pmax = 160 input_number = 16 input_number = 16 input_number = 17 input_number = 52 input_number = 40 input_number = 16 input_number = 18 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 19 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 20 input_number = 16 input_number = 21 input_number = 64 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 23 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 24 input_number = 10 input_number = 16 input_number = 25 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 26 input_number = 40 input_number = 16 input_number = 27 input_number = 82 input_number = 124 input_number = 94 input_number = 142 input_number = 214 pmax = 214 input_number = 322 pmax = 322 input_number = 484 pmax = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 pmax = 700 input_number = 526 input_number = 790 pmax = 790 input_number = 1186 pmax = 1186 input_number = 1780 pmax = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 pmax = 2158 input_number = 3238 pmax = 3238 input_number = 4858 pmax = 4858 input_number = 7288 pmax = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 pmax = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 29 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 30 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 31 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 32 input_number = 33 input_number = 100 input_number = 76 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 35 input_number = 106 input_number = 160 input_number = 16 input_number = 36 input_number = 28 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 37 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 38 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 39 input_number = 118 input_number = 178 input_number = 268 input_number = 202 input_number = 304 input_number = 58 input_number = 88 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 40 input_number = 16 input_number = 41 input_number = 124 input_number = 94 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 42 input_number = 64 input_number = 43 input_number = 130 input_number = 196 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 44 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 45 input_number = 136 input_number = 52 input_number = 40 input_number = 16 input_number = 46 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 47 input_number = 142 input_number = 214 input_number = 322 input_number = 484 input_number = 364 input_number = 274 input_number = 412 input_number = 310 input_number = 466 input_number = 700 input_number = 526 input_number = 790 input_number = 1186 input_number = 1780 input_number = 1336 input_number = 502 input_number = 754 input_number = 1132 input_number = 850 input_number = 1276 input_number = 958 input_number = 1438 input_number = 2158 input_number = 3238 input_number = 4858 input_number = 7288 input_number = 2734 input_number = 4102 input_number = 6154 input_number = 9232 input_number = 1732 input_number = 1300 input_number = 976 input_number = 184 input_number = 70 input_number = 106 input_number = 160 input_number = 16 input_number = 48 input_number = 10 input_number = 16 input_number = 49 input_number = 148 input_number = 112 input_number = 22 input_number = 34 input_number = 52 input_number = 40 input_number = 16 input_number = 50 input_num...