Cody

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

Solution 1614779

Submitted on 22 Aug 2018 by Bernd Seggewiß
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))

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16

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

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16 peak = 52 peak = 16 peak = 40 peak = 52 peak = 160 peak = 16 peak = 52 peak = 52 peak = 88 peak = 20 peak = 64 peak = 52 peak = 160 peak = 24 peak = 88 peak = 40 peak = 9232 peak = 52 peak = 88 peak = 160

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

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16 peak = 52 peak = 16 peak = 40 peak = 52 peak = 160 peak = 16 peak = 52 peak = 52 peak = 88 peak = 20 peak = 64 peak = 52 peak = 160 peak = 24 peak = 88 peak = 40 peak = 9232 peak = 52 peak = 88 peak = 160 peak = 9232 peak = 32 peak = 100 peak = 52 peak = 160 peak = 52 peak = 112 peak = 88 peak = 304 peak = 40 peak = 9232 peak = 64 peak = 196 peak = 52 peak = 136 peak = 160 peak = 9232 peak = 48 peak = 148 peak = 88 peak = 232 peak = 52 peak = 160 peak = 9232 peak = 9232 peak = 56 peak = 196 peak = 88 peak = 304 peak = 160 peak = 184 peak = 9232 peak = 9232 peak = 64 peak = 196 peak = 100 peak = 304 peak = 68 peak = 208 peak = 160 peak = 9232 peak = 72 peak = 9232 peak = 112 peak = 340 peak = 88 peak = 232 peak = 304 peak = 808 peak = 80 peak = 244 peak = 9232 peak = 9232 peak = 84 peak = 256 peak = 196 peak = 592 peak = 88 peak = 304 peak = 136 peak = 9232 peak = 160 peak = 280 peak = 9232 peak = 9232 peak = 96 peak = 9232 peak = 148 peak = 448 peak = 100

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

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16 peak = 52 peak = 16 peak = 40 peak = 52 peak = 160 peak = 16 peak = 52 peak = 52 peak = 88 peak = 20 peak = 64 peak = 52 peak = 160 peak = 24 peak = 88 peak = 40 peak = 9232 peak = 52 peak = 88 peak = 160 peak = 9232 peak = 32 peak = 100 peak = 52 peak = 160 peak = 52 peak = 112 peak = 88 peak = 304 peak = 40 peak = 9232 peak = 64 peak = 196 peak = 52 peak = 136 peak = 160 peak = 9232 peak = 48 peak = 148 peak = 88 peak = 232 peak = 52 peak = 160 peak = 9232 peak = 9232 peak = 56 peak = 196 peak = 88 peak = 304 peak = 160 peak = 184 peak = 9232 peak = 9232 peak = 64 peak = 196 peak = 100 peak = 304 peak = 68 peak = 208 peak = 160 peak = 9232 peak = 72 peak = 9232 peak = 112 peak = 340 peak = 88 peak = 232 peak = 304 peak = 808 peak = 80 peak = 244 peak = 9232 peak = 9232 peak = 84 peak = 256 peak = 196 peak = 592 peak = 88 peak = 304 peak = 136 peak = 9232 peak = 160 peak = 280 peak = 9232 peak = 9232 peak = 96 peak = 9232 peak = 148 peak = 448 peak = 100 peak = 304 peak = 232 peak = 9232 peak = 104 peak = 808 peak = 160 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 112 peak = 340 peak = 196 peak = 520 peak = 116 peak = 352 peak = 304 peak = 808 peak = 160 peak = 9232 peak = 184 peak = 628 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 128 peak = 9232 peak = 196 peak = 592 peak = 132 peak = 400 peak = 304 peak = 916 peak = 136 peak = 9232 peak = 208 peak = 628 peak = 160 peak = 424 peak = 9232 peak = 9232 peak = 144 peak = 9232 peak = 9232 peak = 9232 peak = 148 peak = 448 peak = 340 peak = 1024 peak = 152 peak = 520 peak = 232 peak = 9232 peak = 304 peak = 472 peak = 808 peak = 9232 peak = 160 peak = 9232 peak = 244 peak = 736 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 168 peak = 4372 peak = 256 peak = 9232 peak = 196 peak = 520 peak = 592 peak = 9232 peak = 176 peak = 532 peak = 304 peak = 808 peak = 180 peak = 544 peak = 9232 peak = 9232 peak = 184 peak = 628 peak = 280 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 192 peak = 9232 peak = 9232 peak = 9232 peak = 196 peak = 592 peak = 448 peak = 9232 peak = 200 peak = 1024 peak = 304 peak = 916 peak = 232 peak = 616 peak = 9232 peak = 9232 peak = 208 peak = 628 peak = 808 peak = 952 peak = 212 peak = 640 peak = 9232 peak = 9232 peak = 9232 peak = 736 peak = 9232 peak = 1672 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 224 peak = 4372 peak = 340 peak = 1024 peak = 228 peak = 688 peak = 520 peak = 9232 peak = 232 peak = 9232 peak = 352 peak = 9232 peak = 304 peak = 712 peak = 808 peak = 9232 peak = 240 peak = 724 peak = 9232 peak = 9232 peak = 244 peak = 736 peak = 628 peak = 1672 peak = 9232 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 256 peak = 9232 peak = 9232 peak = 9232 peak = 260 peak = 784 peak = 592 peak = 9232 peak = 264 peak = 9232 peak = 400 peak = 1204 peak = 304 peak = 808 peak = 916 peak = 2752 peak = 272 peak = 820 peak = 9232 peak = 9232 peak = 276 peak = 832 peak = 628 peak = 1888 peak = 280 peak = 952 peak = 424 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 288 peak = 868 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 2248 peak = 296 peak = 9232 peak = 448 peak = 9232 peak = 340 peak = 904 peak = 1024 peak = 3076 peak = 304 peak = 916 peak = 520 peak = 1384 peak = 308 peak = 928 peak = 9232 peak = 9232 peak = 312 peak = 9232 peak = 472 peak = 1600 peak = 808 peak = 952 peak = 9232 peak = 9232 peak = 320 peak = 964 peak = 9232 peak = 9232 peak = 324 peak = 976 peak = 736 peak = 9232 peak = 9232 peak = 1672 peak = 9232 peak = 1492 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 336 peak = 9232 peak = 4372 peak = 4372 peak = 340 peak = 1024 peak = 9232 peak = 9232 peak = 344 peak = 9232 peak = 520 peak = 9232 peak = 592 peak = 1048 peak = 9232 peak = 9232 peak = 352 peak = 9232 peak = 532 peak = 1600 peak = 356 peak = 1072 peak = 808 peak = 9232 peak = 360 peak = 2752 peak = 544 peak = 1636 peak = 9232 peak = 9232 peak = 9232 peak = 4192 peak = 368 peak = 1108 peak = 628 peak = 1672 peak = 372 peak = 1120 peak = 952 peak = 2536 peak = 9232 peak = 9232 peak = 9232 peak = 2752 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 384 peak = 1156 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 392 peak = 2248 peak = 592 peak = 9232 peak = 448 peak = 1192 peak = 9232 peak = 9232 peak = 400 peak = 1204 peak = 1024 peak = 1816 peak = 404 peak = 1216 peak = 916 peak = 2752 peak = 408 peak = 1384 peak = 616 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 416 peak = 9232 peak = 628 peak = 1888 peak = 808 peak = 1264 peak = 952 peak = 3220 peak = 424 peak = 9232 peak = 640 peak = 2752 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 9232 peak = 1300 peak = 736 peak = 1960 peak = 9232 peak = 9232 peak = 1672 peak = 2968 peak = 9232 peak = 1492 peak = 9232 peak = 2248 peak = 9232 peak = 9232 peak = 9232 peak = 39364 peak = 448 peak = 9232 peak = 4372 peak = 4372 peak = 452 peak = 1360 peak = 1024 peak = 3076 peak = 456 peak = 9232 peak = 688 peak = 9232 peak = 520 peak = 1384 peak = 9232 peak = 9232 peak = 464 peak = 1396 peak = 9232 peak = 9232 peak = 468 peak = 1408 peak = 9232 peak = 9232 peak = 472 peak = 1600 peak = 712 peak = 3616 peak = 808 peak = 1432 peak = 9232 peak = 9232 peak = 480 peak = 2752 peak = 724 peak = 2176 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 488 peak = 4192 peak = 736 peak = 9232 peak = 628 peak = 1480 peak = 1672 peak = 14308 peak = 9232 peak = 1492 peak = 952 peak = 2248 peak = 9232 peak = 9232 peak = ...

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

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16 peak = 52 peak = 16 peak = 40 peak = 52 peak = 160 peak = 16 peak = 52 peak = 52 peak = 88 peak = 20 peak = 64 peak = 52 peak = 160 peak = 24 peak = 88 peak = 40 peak = 9232 peak = 52 peak = 88 peak = 160 peak = 9232 peak = 32 peak = 100 peak = 52 peak = 160 peak = 52 peak = 112 peak = 88 peak = 304 peak = 40 peak = 9232 peak = 64 peak = 196 peak = 52 peak = 136 peak = 160 peak = 9232 peak = 48 peak = 148 peak = 88 peak = 232 peak = 52 peak = 160 peak = 9232 peak = 9232 peak = 56 peak = 196 peak = 88 peak = 304 peak = 160 peak = 184 peak = 9232 peak = 9232 peak = 64 peak = 196 peak = 100 peak = 304 peak = 68 peak = 208 peak = 160 peak = 9232 peak = 72 peak = 9232 peak = 112 peak = 340 peak = 88 peak = 232 peak = 304 peak = 808 peak = 80 peak = 244 peak = 9232 peak = 9232 peak = 84 peak = 256 peak = 196 peak = 592 peak = 88 peak = 304 peak = 136 peak = 9232 peak = 160 peak = 280 peak = 9232 peak = 9232 peak = 96 peak = 9232 peak = 148 peak = 448 peak = 100 peak = 304 peak = 232 peak = 9232 peak = 104 peak = 808 peak = 160 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 112 peak = 340 peak = 196 peak = 520 peak = 116 peak = 352 peak = 304 peak = 808 peak = 160 peak = 9232 peak = 184 peak = 628 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 128 peak = 9232 peak = 196 peak = 592 peak = 132 peak = 400 peak = 304 peak = 916 peak = 136 peak = 9232 peak = 208 peak = 628 peak = 160 peak = 424 peak = 9232 peak = 9232 peak = 144 peak = 9232 peak = 9232 peak = 9232 peak = 148 peak = 448 peak = 340 peak = 1024 peak = 152 peak = 520 peak = 232 peak = 9232 peak = 304 peak = 472 peak = 808 peak = 9232 peak = 160 peak = 9232 peak = 244 peak = 736 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 168 peak = 4372 peak = 256 peak = 9232 peak = 196 peak = 520 peak = 592 peak = 9232 peak = 176 peak = 532 peak = 304 peak = 808 peak = 180 peak = 544 peak = 9232 peak = 9232 peak = 184 peak = 628 peak = 280 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 192 peak = 9232 peak = 9232 peak = 9232 peak = 196 peak = 592 peak = 448 peak = 9232 peak = 200 peak = 1024 peak = 304 peak = 916 peak = 232 peak = 616 peak = 9232 peak = 9232 peak = 208 peak = 628 peak = 808 peak = 952 peak = 212 peak = 640 peak = 9232 peak = 9232 peak = 9232 peak = 736 peak = 9232 peak = 1672 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 224 peak = 4372 peak = 340 peak = 1024 peak = 228 peak = 688 peak = 520 peak = 9232 peak = 232 peak = 9232 peak = 352 peak = 9232 peak = 304 peak = 712 peak = 808 peak = 9232 peak = 240 peak = 724 peak = 9232 peak = 9232 peak = 244 peak = 736 peak = 628 peak = 1672 peak = 9232 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 256 peak = 9232 peak = 9232 peak = 9232 peak = 260 peak = 784 peak = 592 peak = 9232 peak = 264 peak = 9232 peak = 400 peak = 1204 peak = 304 peak = 808 peak = 916 peak = 2752 peak = 272 peak = 820 peak = 9232 peak = 9232 peak = 276 peak = 832 peak = 628 peak = 1888 peak = 280 peak = 952 peak = 424 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 288 peak = 868 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 2248 peak = 296 peak = 9232 peak = 448 peak = 9232 peak = 340 peak = 904 peak = 1024 peak = 3076 peak = 304 peak = 916 peak = 520 peak = 1384 peak = 308 peak = 928 peak = 9232 peak = 9232 peak = 312 peak = 9232 peak = 472 peak = 1600 peak = 808 peak = 952 peak = 9232 peak = 9232 peak = 320 peak = 964 peak = 9232 peak = 9232 peak = 324 peak = 976 peak = 736 peak = 9232 peak = 9232 peak = 1672 peak = 9232 peak = 1492 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 336 peak = 9232 peak = 4372 peak = 4372 peak = 340 peak = 1024 peak = 9232 peak = 9232 peak = 344 peak = 9232 peak = 520 peak = 9232 peak = 592 peak = 1048 peak = 9232 peak = 9232 peak = 352 peak = 9232 peak = 532 peak = 1600 peak = 356 peak = 1072 peak = 808 peak = 9232 peak = 360 peak = 2752 peak = 544 peak = 1636 peak = 9232 peak = 9232 peak = 9232 peak = 4192 peak = 368 peak = 1108 peak = 628 peak = 1672 peak = 372 peak = 1120 peak = 952 peak = 2536 peak = 9232 peak = 9232 peak = 9232 peak = 2752 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 384 peak = 1156 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 392 peak = 2248 peak = 592 peak = 9232 peak = 448 peak = 1192 peak = 9232 peak = 9232 peak = 400 peak = 1204 peak = 1024 peak = 1816 peak = 404 peak = 1216 peak = 916 peak = 2752 peak = 408 peak = 1384 peak = 616 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 416 peak = 9232 peak = 628 peak = 1888 peak = 808 peak = 1264 peak = 952 peak = 3220 peak = 424 peak = 9232 peak = 640 peak = 2752 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 9232 peak = 1300 peak = 736 peak = 1960 peak = 9232 peak = 9232 peak = 1672 peak = 2968 peak = 9232 peak = 1492 peak = 9232 peak = 2248 peak = 9232 peak = 9232 peak = 9232 peak = 39364 peak = 448 peak = 9232 peak = 4372 peak = 4372 peak = 452 peak = 1360 peak = 1024 peak = 3076 peak = 456 peak = 9232 peak = 688 peak = 9232 peak = 520 peak = 1384 peak = 9232 peak = 9232 peak = 464 peak = 1396 peak = 9232 peak = 9232 peak = 468 peak = 1408 peak = 9232 peak = 9232 peak = 472 peak = 1600 peak = 712 peak = 3616 peak = 808 peak = 1432 peak = 9232 peak = 9232 peak = 480 peak = 2752 peak = 724 peak = 2176 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 488 peak = 4192 peak = 736 peak = 9232 peak = 628 peak = 1480 peak = 1672 peak = 14308 peak = 9232 peak = 1492 peak = 952 peak = 2248 peak = 9232 peak = 9232 peak = ...

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

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16 peak = 52 peak = 16 peak = 40 peak = 52 peak = 160 peak = 16 peak = 52 peak = 52 peak = 88 peak = 20 peak = 64 peak = 52 peak = 160 peak = 24 peak = 88 peak = 40 peak = 9232 peak = 52 peak = 88 peak = 160 peak = 9232 peak = 32 peak = 100 peak = 52 peak = 160 peak = 52 peak = 112 peak = 88 peak = 304 peak = 40 peak = 9232 peak = 64 peak = 196 peak = 52 peak = 136 peak = 160 peak = 9232 peak = 48 peak = 148 peak = 88 peak = 232 peak = 52 peak = 160 peak = 9232 peak = 9232 peak = 56 peak = 196 peak = 88 peak = 304 peak = 160 peak = 184 peak = 9232 peak = 9232 peak = 64 peak = 196 peak = 100 peak = 304 peak = 68 peak = 208 peak = 160 peak = 9232 peak = 72 peak = 9232 peak = 112 peak = 340 peak = 88 peak = 232 peak = 304 peak = 808 peak = 80 peak = 244 peak = 9232 peak = 9232 peak = 84 peak = 256 peak = 196 peak = 592 peak = 88 peak = 304 peak = 136 peak = 9232 peak = 160 peak = 280 peak = 9232 peak = 9232 peak = 96 peak = 9232 peak = 148 peak = 448 peak = 100 peak = 304 peak = 232 peak = 9232 peak = 104 peak = 808 peak = 160 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 112 peak = 340 peak = 196 peak = 520 peak = 116 peak = 352 peak = 304 peak = 808 peak = 160 peak = 9232 peak = 184 peak = 628 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 128 peak = 9232 peak = 196 peak = 592 peak = 132 peak = 400 peak = 304 peak = 916 peak = 136 peak = 9232 peak = 208 peak = 628 peak = 160 peak = 424 peak = 9232 peak = 9232 peak = 144 peak = 9232 peak = 9232 peak = 9232 peak = 148 peak = 448 peak = 340 peak = 1024 peak = 152 peak = 520 peak = 232 peak = 9232 peak = 304 peak = 472 peak = 808 peak = 9232 peak = 160 peak = 9232 peak = 244 peak = 736 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 168 peak = 4372 peak = 256 peak = 9232 peak = 196 peak = 520 peak = 592 peak = 9232 peak = 176 peak = 532 peak = 304 peak = 808 peak = 180 peak = 544 peak = 9232 peak = 9232 peak = 184 peak = 628 peak = 280 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 192 peak = 9232 peak = 9232 peak = 9232 peak = 196 peak = 592 peak = 448 peak = 9232 peak = 200 peak = 1024 peak = 304 peak = 916 peak = 232 peak = 616 peak = 9232 peak = 9232 peak = 208 peak = 628 peak = 808 peak = 952 peak = 212 peak = 640 peak = 9232 peak = 9232 peak = 9232 peak = 736 peak = 9232 peak = 1672 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 224 peak = 4372 peak = 340 peak = 1024 peak = 228 peak = 688 peak = 520 peak = 9232 peak = 232 peak = 9232 peak = 352 peak = 9232 peak = 304 peak = 712 peak = 808 peak = 9232 peak = 240 peak = 724 peak = 9232 peak = 9232 peak = 244 peak = 736 peak = 628 peak = 1672 peak = 9232 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 256 peak = 9232 peak = 9232 peak = 9232 peak = 260 peak = 784 peak = 592 peak = 9232 peak = 264 peak = 9232 peak = 400 peak = 1204 peak = 304 peak = 808 peak = 916 peak = 2752 peak = 272 peak = 820 peak = 9232 peak = 9232 peak = 276 peak = 832 peak = 628 peak = 1888 peak = 280 peak = 952 peak = 424 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 288 peak = 868 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 2248 peak = 296 peak = 9232 peak = 448 peak = 9232 peak = 340 peak = 904 peak = 1024 peak = 3076 peak = 304 peak = 916 peak = 520 peak = 1384 peak = 308 peak = 928 peak = 9232 peak = 9232 peak = 312 peak = 9232 peak = 472 peak = 1600 peak = 808 peak = 952 peak = 9232 peak = 9232 peak = 320 peak = 964 peak = 9232 peak = 9232 peak = 324 peak = 976 peak = 736 peak = 9232 peak = 9232 peak = 1672 peak = 9232 peak = 1492 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 336 peak = 9232 peak = 4372 peak = 4372 peak = 340 peak = 1024 peak = 9232 peak = 9232 peak = 344 peak = 9232 peak = 520 peak = 9232 peak = 592 peak = 1048 peak = 9232 peak = 9232 peak = 352 peak = 9232 peak = 532 peak = 1600 peak = 356 peak = 1072 peak = 808 peak = 9232 peak = 360 peak = 2752 peak = 544 peak = 1636 peak = 9232 peak = 9232 peak = 9232 peak = 4192 peak = 368 peak = 1108 peak = 628 peak = 1672 peak = 372 peak = 1120 peak = 952 peak = 2536 peak = 9232 peak = 9232 peak = 9232 peak = 2752 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 384 peak = 1156 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 392 peak = 2248 peak = 592 peak = 9232 peak = 448 peak = 1192 peak = 9232 peak = 9232 peak = 400 peak = 1204 peak = 1024 peak = 1816 peak = 404 peak = 1216 peak = 916 peak = 2752 peak = 408 peak = 1384 peak = 616 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 416 peak = 9232 peak = 628 peak = 1888 peak = 808 peak = 1264 peak = 952 peak = 3220 peak = 424 peak = 9232 peak = 640 peak = 2752 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 9232 peak = 1300 peak = 736 peak = 1960 peak = 9232 peak = 9232 peak = 1672 peak = 2968 peak = 9232 peak = 1492 peak = 9232 peak = 2248 peak = 9232 peak = 9232 peak = 9232 peak = 39364 peak = 448 peak = 9232 peak = 4372 peak = 4372 peak = 452 peak = 1360 peak = 1024 peak = 3076 peak = 456 peak = 9232 peak = 688 peak = 9232 peak = 520 peak = 1384 peak = 9232 peak = 9232 peak = 464 peak = 1396 peak = 9232 peak = 9232 peak = 468 peak = 1408 peak = 9232 peak = 9232 peak = 472 peak = 1600 peak = 712 peak = 3616 peak = 808 peak = 1432 peak = 9232 peak = 9232 peak = 480 peak = 2752 peak = 724 peak = 2176 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 488 peak = 4192 peak = 736 peak = 9232 peak = 628 peak = 1480 peak = 1672 peak = 14308 peak = 9232 peak = 1492 peak = 952 peak = 2248 peak = 9232 peak = 9232 peak = ...

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

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16 peak = 52 peak = 16 peak = 40 peak = 52 peak = 160 peak = 16 peak = 52 peak = 52 peak = 88 peak = 20 peak = 64 peak = 52 peak = 160 peak = 24 peak = 88 peak = 40 peak = 9232 peak = 52 peak = 88 peak = 160 peak = 9232 peak = 32 peak = 100 peak = 52 peak = 160 peak = 52 peak = 112 peak = 88 peak = 304 peak = 40 peak = 9232 peak = 64 peak = 196 peak = 52 peak = 136 peak = 160 peak = 9232 peak = 48 peak = 148 peak = 88 peak = 232 peak = 52 peak = 160 peak = 9232 peak = 9232 peak = 56 peak = 196 peak = 88 peak = 304 peak = 160 peak = 184 peak = 9232 peak = 9232 peak = 64 peak = 196 peak = 100 peak = 304 peak = 68 peak = 208 peak = 160 peak = 9232 peak = 72 peak = 9232 peak = 112 peak = 340 peak = 88 peak = 232 peak = 304 peak = 808 peak = 80 peak = 244 peak = 9232 peak = 9232 peak = 84 peak = 256 peak = 196 peak = 592 peak = 88 peak = 304 peak = 136 peak = 9232 peak = 160 peak = 280 peak = 9232 peak = 9232 peak = 96 peak = 9232 peak = 148 peak = 448 peak = 100 peak = 304 peak = 232 peak = 9232 peak = 104 peak = 808 peak = 160 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 112 peak = 340 peak = 196 peak = 520 peak = 116 peak = 352 peak = 304 peak = 808 peak = 160 peak = 9232 peak = 184 peak = 628 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 128 peak = 9232 peak = 196 peak = 592 peak = 132 peak = 400 peak = 304 peak = 916 peak = 136 peak = 9232 peak = 208 peak = 628 peak = 160 peak = 424 peak = 9232 peak = 9232 peak = 144 peak = 9232 peak = 9232 peak = 9232 peak = 148 peak = 448 peak = 340 peak = 1024 peak = 152 peak = 520 peak = 232 peak = 9232 peak = 304 peak = 472 peak = 808 peak = 9232 peak = 160 peak = 9232 peak = 244 peak = 736 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 168 peak = 4372 peak = 256 peak = 9232 peak = 196 peak = 520 peak = 592 peak = 9232 peak = 176 peak = 532 peak = 304 peak = 808 peak = 180 peak = 544 peak = 9232 peak = 9232 peak = 184 peak = 628 peak = 280 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 192 peak = 9232 peak = 9232 peak = 9232 peak = 196 peak = 592 peak = 448 peak = 9232 peak = 200 peak = 1024 peak = 304 peak = 916 peak = 232 peak = 616 peak = 9232 peak = 9232 peak = 208 peak = 628 peak = 808 peak = 952 peak = 212 peak = 640 peak = 9232 peak = 9232 peak = 9232 peak = 736 peak = 9232 peak = 1672 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 224 peak = 4372 peak = 340 peak = 1024 peak = 228 peak = 688 peak = 520 peak = 9232 peak = 232 peak = 9232 peak = 352 peak = 9232 peak = 304 peak = 712 peak = 808 peak = 9232 peak = 240 peak = 724 peak = 9232 peak = 9232 peak = 244 peak = 736 peak = 628 peak = 1672 peak = 9232 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 256 peak = 9232 peak = 9232 peak = 9232 peak = 260 peak = 784 peak = 592 peak = 9232 peak = 264 peak = 9232 peak = 400 peak = 1204 peak = 304 peak = 808 peak = 916 peak = 2752 peak = 272 peak = 820 peak = 9232 peak = 9232 peak = 276 peak = 832 peak = 628 peak = 1888 peak = 280 peak = 952 peak = 424 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 288 peak = 868 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 2248 peak = 296 peak = 9232 peak = 448 peak = 9232 peak = 340 peak = 904 peak = 1024 peak = 3076 peak = 304 peak = 916 peak = 520 peak = 1384 peak = 308 peak = 928 peak = 9232 peak = 9232 peak = 312 peak = 9232 peak = 472 peak = 1600 peak = 808 peak = 952 peak = 9232 peak = 9232 peak = 320 peak = 964 peak = 9232 peak = 9232 peak = 324 peak = 976 peak = 736 peak = 9232 peak = 9232 peak = 1672 peak = 9232 peak = 1492 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 336 peak = 9232 peak = 4372 peak = 4372 peak = 340 peak = 1024 peak = 9232 peak = 9232 peak = 344 peak = 9232 peak = 520 peak = 9232 peak = 592 peak = 1048 peak = 9232 peak = 9232 peak = 352 peak = 9232 peak = 532 peak = 1600 peak = 356 peak = 1072 peak = 808 peak = 9232 peak = 360 peak = 2752 peak = 544 peak = 1636 peak = 9232 peak = 9232 peak = 9232 peak = 4192 peak = 368 peak = 1108 peak = 628 peak = 1672 peak = 372 peak = 1120 peak = 952 peak = 2536 peak = 9232 peak = 9232 peak = 9232 peak = 2752 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 384 peak = 1156 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 392 peak = 2248 peak = 592 peak = 9232 peak = 448 peak = 1192 peak = 9232 peak = 9232 peak = 400 peak = 1204 peak = 1024 peak = 1816 peak = 404 peak = 1216 peak = 916 peak = 2752 peak = 408 peak = 1384 peak = 616 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 416 peak = 9232 peak = 628 peak = 1888 peak = 808 peak = 1264 peak = 952 peak = 3220 peak = 424 peak = 9232 peak = 640 peak = 2752 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 9232 peak = 1300 peak = 736 peak = 1960 peak = 9232 peak = 9232 peak = 1672 peak = 2968 peak = 9232 peak = 1492 peak = 9232 peak = 2248 peak = 9232 peak = 9232 peak = 9232 peak = 39364 peak = 448 peak = 9232 peak = 4372 peak = 4372 peak = 452 peak = 1360 peak = 1024 peak = 3076 peak = 456 peak = 9232 peak = 688 peak = 9232 peak = 520 peak = 1384 peak = 9232 peak = 9232 peak = 464 peak = 1396 peak = 9232 peak = 9232 peak = 468 peak = 1408 peak = 9232 peak = 9232 peak = 472 peak = 1600 peak = 712 peak = 3616 peak = 808 peak = 1432 peak = 9232 peak = 9232 peak = 480 peak = 2752 peak = 724 peak = 2176 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 488 peak = 4192 peak = 736 peak = 9232 peak = 628 peak = 1480 peak = 1672 peak = 14308 peak = 9232 peak = 1492 peak = 952 peak = 2248 peak = 9232 peak = 9232 peak = ...

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

peak = 1 peak = 2 peak = 16 peak = 4 peak = 16 peak = 16 peak = 52 peak = 8 peak = 52 peak = 16 peak = 52 peak = 16 peak = 40 peak = 52 peak = 160 peak = 16 peak = 52 peak = 52 peak = 88 peak = 20 peak = 64 peak = 52 peak = 160 peak = 24 peak = 88 peak = 40 peak = 9232 peak = 52 peak = 88 peak = 160 peak = 9232 peak = 32 peak = 100 peak = 52 peak = 160 peak = 52 peak = 112 peak = 88 peak = 304 peak = 40 peak = 9232 peak = 64 peak = 196 peak = 52 peak = 136 peak = 160 peak = 9232 peak = 48 peak = 148 peak = 88 peak = 232 peak = 52 peak = 160 peak = 9232 peak = 9232 peak = 56 peak = 196 peak = 88 peak = 304 peak = 160 peak = 184 peak = 9232 peak = 9232 peak = 64 peak = 196 peak = 100 peak = 304 peak = 68 peak = 208 peak = 160 peak = 9232 peak = 72 peak = 9232 peak = 112 peak = 340 peak = 88 peak = 232 peak = 304 peak = 808 peak = 80 peak = 244 peak = 9232 peak = 9232 peak = 84 peak = 256 peak = 196 peak = 592 peak = 88 peak = 304 peak = 136 peak = 9232 peak = 160 peak = 280 peak = 9232 peak = 9232 peak = 96 peak = 9232 peak = 148 peak = 448 peak = 100 peak = 304 peak = 232 peak = 9232 peak = 104 peak = 808 peak = 160 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 112 peak = 340 peak = 196 peak = 520 peak = 116 peak = 352 peak = 304 peak = 808 peak = 160 peak = 9232 peak = 184 peak = 628 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 128 peak = 9232 peak = 196 peak = 592 peak = 132 peak = 400 peak = 304 peak = 916 peak = 136 peak = 9232 peak = 208 peak = 628 peak = 160 peak = 424 peak = 9232 peak = 9232 peak = 144 peak = 9232 peak = 9232 peak = 9232 peak = 148 peak = 448 peak = 340 peak = 1024 peak = 152 peak = 520 peak = 232 peak = 9232 peak = 304 peak = 472 peak = 808 peak = 9232 peak = 160 peak = 9232 peak = 244 peak = 736 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 168 peak = 4372 peak = 256 peak = 9232 peak = 196 peak = 520 peak = 592 peak = 9232 peak = 176 peak = 532 peak = 304 peak = 808 peak = 180 peak = 544 peak = 9232 peak = 9232 peak = 184 peak = 628 peak = 280 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 192 peak = 9232 peak = 9232 peak = 9232 peak = 196 peak = 592 peak = 448 peak = 9232 peak = 200 peak = 1024 peak = 304 peak = 916 peak = 232 peak = 616 peak = 9232 peak = 9232 peak = 208 peak = 628 peak = 808 peak = 952 peak = 212 peak = 640 peak = 9232 peak = 9232 peak = 9232 peak = 736 peak = 9232 peak = 1672 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 224 peak = 4372 peak = 340 peak = 1024 peak = 228 peak = 688 peak = 520 peak = 9232 peak = 232 peak = 9232 peak = 352 peak = 9232 peak = 304 peak = 712 peak = 808 peak = 9232 peak = 240 peak = 724 peak = 9232 peak = 9232 peak = 244 peak = 736 peak = 628 peak = 1672 peak = 9232 peak = 952 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 256 peak = 9232 peak = 9232 peak = 9232 peak = 260 peak = 784 peak = 592 peak = 9232 peak = 264 peak = 9232 peak = 400 peak = 1204 peak = 304 peak = 808 peak = 916 peak = 2752 peak = 272 peak = 820 peak = 9232 peak = 9232 peak = 276 peak = 832 peak = 628 peak = 1888 peak = 280 peak = 952 peak = 424 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 288 peak = 868 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 2248 peak = 296 peak = 9232 peak = 448 peak = 9232 peak = 340 peak = 904 peak = 1024 peak = 3076 peak = 304 peak = 916 peak = 520 peak = 1384 peak = 308 peak = 928 peak = 9232 peak = 9232 peak = 312 peak = 9232 peak = 472 peak = 1600 peak = 808 peak = 952 peak = 9232 peak = 9232 peak = 320 peak = 964 peak = 9232 peak = 9232 peak = 324 peak = 976 peak = 736 peak = 9232 peak = 9232 peak = 1672 peak = 9232 peak = 1492 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 336 peak = 9232 peak = 4372 peak = 4372 peak = 340 peak = 1024 peak = 9232 peak = 9232 peak = 344 peak = 9232 peak = 520 peak = 9232 peak = 592 peak = 1048 peak = 9232 peak = 9232 peak = 352 peak = 9232 peak = 532 peak = 1600 peak = 356 peak = 1072 peak = 808 peak = 9232 peak = 360 peak = 2752 peak = 544 peak = 1636 peak = 9232 peak = 9232 peak = 9232 peak = 4192 peak = 368 peak = 1108 peak = 628 peak = 1672 peak = 372 peak = 1120 peak = 952 peak = 2536 peak = 9232 peak = 9232 peak = 9232 peak = 2752 peak = 9232 peak = 9232 peak = 4372 peak = 13120 peak = 384 peak = 1156 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 392 peak = 2248 peak = 592 peak = 9232 peak = 448 peak = 1192 peak = 9232 peak = 9232 peak = 400 peak = 1204 peak = 1024 peak = 1816 peak = 404 peak = 1216 peak = 916 peak = 2752 peak = 408 peak = 1384 peak = 616 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 416 peak = 9232 peak = 628 peak = 1888 peak = 808 peak = 1264 peak = 952 peak = 3220 peak = 424 peak = 9232 peak = 640 peak = 2752 peak = 9232 peak = 9232 peak = 9232 peak = 4372 peak = 9232 peak = 1300 peak = 736 peak = 1960 peak = 9232 peak = 9232 peak = 1672 peak = 2968 peak = 9232 peak = 1492 peak = 9232 peak = 2248 peak = 9232 peak = 9232 peak = 9232 peak = 39364 peak = 448 peak = 9232 peak = 4372 peak = 4372 peak = 452 peak = 1360 peak = 1024 peak = 3076 peak = 456 peak = 9232 peak = 688 peak = 9232 peak = 520 peak = 1384 peak = 9232 peak = 9232 peak = 464 peak = 1396 peak = 9232 peak = 9232 peak = 468 peak = 1408 peak = 9232 peak = 9232 peak = 472 peak = 1600 peak = 712 peak = 3616 peak = 808 peak = 1432 peak = 9232 peak = 9232 peak = 480 peak = 2752 peak = 724 peak = 2176 peak = 9232 peak = 9232 peak = 9232 peak = 9232 peak = 488 peak = 4192 peak = 736 peak = 9232 peak = 628 peak = 1480 peak = 1672 peak = 14308 peak = 9232 peak = 1492 peak = 952 peak = 2248 peak = 9232 peak = 9232 peak = ...