Cody

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

Solution 1695537

Submitted on 18 Dec 2018 by Charles Juenger
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))

b = 4 2 16 4 16 16 52 8 52 16 pmax = 52

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

b = Columns 1 through 15 4 2 16 4 16 16 52 8 52 16 52 16 40 52 160 Columns 16 through 30 16 52 52 88 20 64 52 160 24 88 40 9232 52 88 160 pmax = 9232

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

b = Columns 1 through 15 4 2 16 4 16 16 52 8 52 16 52 16 40 52 160 Columns 16 through 30 16 52 52 88 20 64 52 160 24 88 40 9232 52 88 160 Columns 31 through 45 9232 32 100 52 160 52 112 88 304 40 9232 64 196 52 136 Columns 46 through 60 160 9232 48 148 88 232 52 160 9232 9232 56 196 88 304 160 Columns 61 through 75 184 9232 9232 64 196 100 304 68 208 160 9232 72 9232 112 340 Columns 76 through 90 88 232 304 808 80 244 9232 9232 84 256 196 592 88 304 136 Columns 91 through 100 9232 160 280 9232 9232 96 9232 148 448 100 pmax = 9232

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

b = Columns 1 through 15 4 2 16 4 16 16 52 8 52 16 52 16 40 52 160 Columns 16 through 30 16 52 52 88 20 64 52 160 24 88 40 9232 52 88 160 Columns 31 through 45 9232 32 100 52 160 52 112 88 304 40 9232 64 196 52 136 Columns 46 through 60 160 9232 48 148 88 232 52 160 9232 9232 56 196 88 304 160 Columns 61 through 75 184 9232 9232 64 196 100 304 68 208 160 9232 72 9232 112 340 Columns 76 through 90 88 232 304 808 80 244 9232 9232 84 256 196 592 88 304 136 Columns 91 through 105 9232 160 280 9232 9232 96 9232 148 448 100 304 232 9232 104 808 Columns 106 through 120 160 9232 9232 9232 9232 9232 112 340 196 520 116 352 304 808 160 Columns 121 through 135 9232 184 628 9232 9232 9232 4372 128 9232 196 592 132 400 304 916 Columns 136 through 150 136 9232 208 628 160 424 9232 9232 144 9232 9232 9232 148 448 340 Columns 151 through 165 1024 152 520 232 9232 304 472 808 9232 160 9232 244 736 9232 9232 Columns 166 through 180 9232 9232 168 4372 256 9232 196 520 592 9232 176 532 304 808 180 Columns 181 through 195 544 9232 9232 184 628 280 952 9232 9232 9232 4372 192 9232 9232 9232 Columns 196 through 210 196 592 448 9232 200 1024 304 916 232 616 9232 9232 208 628 808 Columns 211 through 225 952 212 640 9232 9232 9232 736 9232 1672 9232 9232 9232 9232 224 4372 Columns 226 through 240 340 1024 228 688 520 9232 232 9232 352 9232 304 712 808 9232 240 Columns 241 through 255 724 9232 9232 244 736 628 1672 9232 952 9232 9232 9232 9232 4372 13120 Columns 256 through 270 256 9232 9232 9232 260 784 592 9232 264 9232 400 1204 304 808 916 Columns 271 through 285 2752 272 820 9232 9232 276 832 628 1888 280 952 424 9232 9232 9232 Columns 286 through 300 9232 4372 288 868 9232 9232 9232 9232 9232 2248 296 9232 448 9232 340 Columns 301 through 315 904 1024 3076 304 916 520 1384 308 928 9232 9232 312 9232 472 1600 Columns 316 through 330 808 952 9232 9232 320 964 9232 9232 324 976 736 9232 9232 1672 9232 Columns 331 through 345 1492 9232 9232 9232 9232 336 9232 4372 4372 340 1024 9232 9232 344 9232 Columns 346 through 360 520 9232 592 1048 9232 9232 352 9232 532 1600 356 1072 808 9232 360 Columns 361 through 375 2752 544 1636 9232 9232 9232 4192 368 1108 628 1672 372 1120 952 2536 Columns 376 through 390 9232 9232 9232 2752 9232 9232 4372 13120 384 1156 9232 9232 9232 9232 9232 Columns 391 through 405 9232 392 2248 592 9232 448 1192 9232 9232 400 1204 1024 1816 404 1216 Columns 406 through 420 916 2752 408 1384 616 9232 9232 9232 9232 9232 416 9232 628 1888 808 Columns 421 through 435 1264 952 3220 424 9232 640 2752 9232 9232 9232 4372 9232 1300 736 1960 Columns 436 through 450 9232 9232 1672 2968 9232 1492 9232 2248 9232 9232 9232 39364 448 9232 4372 Columns 451 through 465 4372 452 1360 1024 3076 456 9232 688 9232 520 1384 9232 9232 464 1396 Columns 466 through 480 9232 9232 468 1408 9232 9232 472 1600 712 3616 808 1432 9232 9232 480 Columns 481 through 495 2752 724 2176 9232 9232 9232 9232 488 4192 736 9232 628 1480 1672 14308 Columns 496 through 510 9232 1492 952 2248 9232 9232 9232 9232 9232 2752 9232 2896 4372 4372 13120 Columns 511 through 525 39364 512 1540 9232 9232 9232 9232 9232 3508 520 9232 784 9232 592 1576 Columns 526 through 540 9232 9232 528 1588 9232 9232 532 1600 1204 3616 536 1816 808 9232 916 Columns 541 through 555 1624 2752 9232 544 1636 820 2464 9232 9232 9232 4192 552 9232 832 2500 Columns 556 through 570 628 1672 1888 8080 560 1684 952 2536 564 1696 9232 9232 9232 2752 9232 Columns 571 through 585 2896 9232 9232 4372 13120 576 1732 868 2608 9232 9232 9232 3940 9232 2968 Columns 586 through 600 9232 9232 9232 9232 2248 5992 592 9232 9232 9232 596 1792 9232 9232 600 Columns 601 through 615 4372 904 5812 1024 1816 3076 9232 608 9232 916 2752 612 1840 1384 10528 Columns 616 through 630 616 9232 928 9232 9232 9232 9232 9232 624 1876 9232 9232 628 1888 1600 Columns 631 through 645 4264 808 3616 952 3220 9232 9232 9232 41524 640 2752 964 2896 9232 9232 Columns 646 through 660 9232 4372 648 9232 976 9232 736 1960 9232 9232 9232 1972 1672 2968 9232 Columns 661 through 675 9232 1492 4480 9232 2248 9232 21688 9232 9232 9232 39364 672 2752 9232 9232 Columns 676 through 690 4372 4372 4372 5812 680 39364 1024 3076 9232 9232 9232 6964 688 9232 9232 Columns 691 through 705 9232 692 2080 9232 9232 696 9232 1048 3544 9232 9232 9232 250504 704 2116 Columns 706 through 720 9232 9232 708 2128 1600 4804 712 3616 1072 3220 808 2152 9232 ...

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

b = Columns 1 through 15 4 2 16 4 16 16 52 8 52 16 52 16 40 52 160 Columns 16 through 30 16 52 52 88 20 64 52 160 24 88 40 9232 52 88 160 Columns 31 through 45 9232 32 100 52 160 52 112 88 304 40 9232 64 196 52 136 Columns 46 through 60 160 9232 48 148 88 232 52 160 9232 9232 56 196 88 304 160 Columns 61 through 75 184 9232 9232 64 196 100 304 68 208 160 9232 72 9232 112 340 Columns 76 through 90 88 232 304 808 80 244 9232 9232 84 256 196 592 88 304 136 Columns 91 through 105 9232 160 280 9232 9232 96 9232 148 448 100 304 232 9232 104 808 Columns 106 through 120 160 9232 9232 9232 9232 9232 112 340 196 520 116 352 304 808 160 Columns 121 through 135 9232 184 628 9232 9232 9232 4372 128 9232 196 592 132 400 304 916 Columns 136 through 150 136 9232 208 628 160 424 9232 9232 144 9232 9232 9232 148 448 340 Columns 151 through 165 1024 152 520 232 9232 304 472 808 9232 160 9232 244 736 9232 9232 Columns 166 through 180 9232 9232 168 4372 256 9232 196 520 592 9232 176 532 304 808 180 Columns 181 through 195 544 9232 9232 184 628 280 952 9232 9232 9232 4372 192 9232 9232 9232 Columns 196 through 210 196 592 448 9232 200 1024 304 916 232 616 9232 9232 208 628 808 Columns 211 through 225 952 212 640 9232 9232 9232 736 9232 1672 9232 9232 9232 9232 224 4372 Columns 226 through 240 340 1024 228 688 520 9232 232 9232 352 9232 304 712 808 9232 240 Columns 241 through 255 724 9232 9232 244 736 628 1672 9232 952 9232 9232 9232 9232 4372 13120 Columns 256 through 270 256 9232 9232 9232 260 784 592 9232 264 9232 400 1204 304 808 916 Columns 271 through 285 2752 272 820 9232 9232 276 832 628 1888 280 952 424 9232 9232 9232 Columns 286 through 300 9232 4372 288 868 9232 9232 9232 9232 9232 2248 296 9232 448 9232 340 Columns 301 through 315 904 1024 3076 304 916 520 1384 308 928 9232 9232 312 9232 472 1600 Columns 316 through 330 808 952 9232 9232 320 964 9232 9232 324 976 736 9232 9232 1672 9232 Columns 331 through 345 1492 9232 9232 9232 9232 336 9232 4372 4372 340 1024 9232 9232 344 9232 Columns 346 through 360 520 9232 592 1048 9232 9232 352 9232 532 1600 356 1072 808 9232 360 Columns 361 through 375 2752 544 1636 9232 9232 9232 4192 368 1108 628 1672 372 1120 952 2536 Columns 376 through 390 9232 9232 9232 2752 9232 9232 4372 13120 384 1156 9232 9232 9232 9232 9232 Columns 391 through 405 9232 392 2248 592 9232 448 1192 9232 9232 400 1204 1024 1816 404 1216 Columns 406 through 420 916 2752 408 1384 616 9232 9232 9232 9232 9232 416 9232 628 1888 808 Columns 421 through 435 1264 952 3220 424 9232 640 2752 9232 9232 9232 4372 9232 1300 736 1960 Columns 436 through 450 9232 9232 1672 2968 9232 1492 9232 2248 9232 9232 9232 39364 448 9232 4372 Columns 451 through 465 4372 452 1360 1024 3076 456 9232 688 9232 520 1384 9232 9232 464 1396 Columns 466 through 480 9232 9232 468 1408 9232 9232 472 1600 712 3616 808 1432 9232 9232 480 Columns 481 through 495 2752 724 2176 9232 9232 9232 9232 488 4192 736 9232 628 1480 1672 14308 Columns 496 through 510 9232 1492 952 2248 9232 9232 9232 9232 9232 2752 9232 2896 4372 4372 13120 Columns 511 through 525 39364 512 1540 9232 9232 9232 9232 9232 3508 520 9232 784 9232 592 1576 Columns 526 through 540 9232 9232 528 1588 9232 9232 532 1600 1204 3616 536 1816 808 9232 916 Columns 541 through 555 1624 2752 9232 544 1636 820 2464 9232 9232 9232 4192 552 9232 832 2500 Columns 556 through 570 628 1672 1888 8080 560 1684 952 2536 564 1696 9232 9232 9232 2752 9232 Columns 571 through 585 2896 9232 9232 4372 13120 576 1732 868 2608 9232 9232 9232 3940 9232 2968 Columns 586 through 600 9232 9232 9232 9232 2248 5992 592 9232 9232 9232 596 1792 9232 9232 600 Columns 601 through 615 4372 904 5812 1024 1816 3076 9232 608 9232 916 2752 612 1840 1384 10528 Columns 616 through 630 616 9232 928 9232 9232 9232 9232 9232 624 1876 9232 9232 628 1888 1600 Columns 631 through 645 4264 808 3616 952 3220 9232 9232 9232 41524 640 2752 964 2896 9232 9232 Columns 646 through 660 9232 4372 648 9232 976 9232 736 1960 9232 9232 9232 1972 1672 2968 9232 Columns 661 through 675 9232 1492 4480 9232 2248 9232 21688 9232 9232 9232 39364 672 2752 9232 9232 Columns 676 through 690 4372 4372 4372 5812 680 39364 1024 3076 9232 9232 9232 6964 688 9232 9232 Columns 691 through 705 9232 692 2080 9232 9232 696 9232 1048 3544 9232 9232 9232 250504 704 2116 Columns 706 through 720 9232 9232 708 2128 1600 4804 712 3616 1072 3220 808 2152 9232 ...

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

b = Columns 1 through 15 4 2 16 4 16 16 52 8 52 16 52 16 40 52 160 Columns 16 through 30 16 52 52 88 20 64 52 160 24 88 40 9232 52 88 160 Columns 31 through 45 9232 32 100 52 160 52 112 88 304 40 9232 64 196 52 136 Columns 46 through 60 160 9232 48 148 88 232 52 160 9232 9232 56 196 88 304 160 Columns 61 through 75 184 9232 9232 64 196 100 304 68 208 160 9232 72 9232 112 340 Columns 76 through 90 88 232 304 808 80 244 9232 9232 84 256 196 592 88 304 136 Columns 91 through 105 9232 160 280 9232 9232 96 9232 148 448 100 304 232 9232 104 808 Columns 106 through 120 160 9232 9232 9232 9232 9232 112 340 196 520 116 352 304 808 160 Columns 121 through 135 9232 184 628 9232 9232 9232 4372 128 9232 196 592 132 400 304 916 Columns 136 through 150 136 9232 208 628 160 424 9232 9232 144 9232 9232 9232 148 448 340 Columns 151 through 165 1024 152 520 232 9232 304 472 808 9232 160 9232 244 736 9232 9232 Columns 166 through 180 9232 9232 168 4372 256 9232 196 520 592 9232 176 532 304 808 180 Columns 181 through 195 544 9232 9232 184 628 280 952 9232 9232 9232 4372 192 9232 9232 9232 Columns 196 through 210 196 592 448 9232 200 1024 304 916 232 616 9232 9232 208 628 808 Columns 211 through 225 952 212 640 9232 9232 9232 736 9232 1672 9232 9232 9232 9232 224 4372 Columns 226 through 240 340 1024 228 688 520 9232 232 9232 352 9232 304 712 808 9232 240 Columns 241 through 255 724 9232 9232 244 736 628 1672 9232 952 9232 9232 9232 9232 4372 13120 Columns 256 through 270 256 9232 9232 9232 260 784 592 9232 264 9232 400 1204 304 808 916 Columns 271 through 285 2752 272 820 9232 9232 276 832 628 1888 280 952 424 9232 9232 9232 Columns 286 through 300 9232 4372 288 868 9232 9232 9232 9232 9232 2248 296 9232 448 9232 340 Columns 301 through 315 904 1024 3076 304 916 520 1384 308 928 9232 9232 312 9232 472 1600 Columns 316 through 330 808 952 9232 9232 320 964 9232 9232 324 976 736 9232 9232 1672 9232 Columns 331 through 345 1492 9232 9232 9232 9232 336 9232 4372 4372 340 1024 9232 9232 344 9232 Columns 346 through 360 520 9232 592 1048 9232 9232 352 9232 532 1600 356 1072 808 9232 360 Columns 361 through 375 2752 544 1636 9232 9232 9232 4192 368 1108 628 1672 372 1120 952 2536 Columns 376 through 390 9232 9232 9232 2752 9232 9232 4372 13120 384 1156 9232 9232 9232 9232 9232 Columns 391 through 405 9232 392 2248 592 9232 448 1192 9232 9232 400 1204 1024 1816 404 1216 Columns 406 through 420 916 2752 408 1384 616 9232 9232 9232 9232 9232 416 9232 628 1888 808 Columns 421 through 435 1264 952 3220 424 9232 640 2752 9232 9232 9232 4372 9232 1300 736 1960 Columns 436 through 450 9232 9232 1672 2968 9232 1492 9232 2248 9232 9232 9232 39364 448 9232 4372 Columns 451 through 465 4372 452 1360 1024 3076 456 9232 688 9232 520 1384 9232 9232 464 1396 Columns 466 through 480 9232 9232 468 1408 9232 9232 472 1600 712 3616 808 1432 9232 9232 480 Columns 481 through 495 2752 724 2176 9232 9232 9232 9232 488 4192 736 9232 628 1480 1672 14308 Columns 496 through 510 9232 1492 952 2248 9232 9232 9232 9232 9232 2752 9232 2896 4372 4372 13120 Columns 511 through 525 39364 512 1540 9232 9232 9232 9232 9232 3508 520 9232 784 9232 592 1576 Columns 526 through 540 9232 9232 528 1588 9232 9232 532 1600 1204 3616 536 1816 808 9232 916 Columns 541 through 555 1624 2752 9232 544 1636 820 2464 9232 9232 9232 4192 552 9232 832 2500 Columns 556 through 570 628 1672 1888 8080 560 1684 952 2536 564 1696 9232 9232 9232 2752 9232 Columns 571 through 585 2896 9232 9232 4372 13120 576 1732 868 2608 9232 9232 9232 3940 9232 2968 Columns 586 through 600 9232 9232 9232 9232 2248 5992 592 9232 9232 9232 596 1792 9232 9232 600 Columns 601 through 615 4372 904 5812 1024 1816 3076 9232 608 9232 916 2752 612 1840 1384 10528 Columns 616 through 630 616 9232 928 9232 9232 9232 9232 9232 624 1876 9232 9232 628 1888 1600 Columns 631 through 645 4264 808 3616 952 3220 9232 9232 9232 41524 640 2752 964 2896 9232 9232 Columns 646 through 660 9232 4372 648 9232 976 9232 736 1960 9232 9232 9232 1972 1672 2968 9232 Columns 661 through 675 9232 1492 4480 9232 2248 9232 21688 9232 9232 9232 39364 672 2752 9232 9232 Columns 676 through 690 4372 4372 4372 5812 680 39364 1024 3076 9232 9232 9232 6964 688 9232 9232 Columns 691 through 705 9232 692 2080 9232 9232 696 9232 1048 3544 9232 9232 9232 250504 704 2116 Columns 706 through 720 9232 9232 708 2128 1600 4804 712 3616 1072 3220 808 2152 9232 ...

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

b = Columns 1 through 15 4 2 16 4 16 16 52 8 52 16 52 16 40 52 160 Columns 16 through 30 16 52 52 88 20 64 52 160 24 88 40 9232 52 88 160 Columns 31 through 45 9232 32 100 52 160 52 112 88 304 40 9232 64 196 52 136 Columns 46 through 60 160 9232 48 148 88 232 52 160 9232 9232 56 196 88 304 160 Columns 61 through 75 184 9232 9232 64 196 100 304 68 208 160 9232 72 9232 112 340 Columns 76 through 90 88 232 304 808 80 244 9232 9232 84 256 196 592 88 304 136 Columns 91 through 105 9232 160 280 9232 9232 96 9232 148 448 100 304 232 9232 104 808 Columns 106 through 120 160 9232 9232 9232 9232 9232 112 340 196 520 116 352 304 808 160 Columns 121 through 135 9232 184 628 9232 9232 9232 4372 128 9232 196 592 132 400 304 916 Columns 136 through 150 136 9232 208 628 160 424 9232 9232 144 9232 9232 9232 148 448 340 Columns 151 through 165 1024 152 520 232 9232 304 472 808 9232 160 9232 244 736 9232 9232 Columns 166 through 180 9232 9232 168 4372 256 9232 196 520 592 9232 176 532 304 808 180 Columns 181 through 195 544 9232 9232 184 628 280 952 9232 9232 9232 4372 192 9232 9232 9232 Columns 196 through 210 196 592 448 9232 200 1024 304 916 232 616 9232 9232 208 628 808 Columns 211 through 225 952 212 640 9232 9232 9232 736 9232 1672 9232 9232 9232 9232 224 4372 Columns 226 through 240 340 1024 228 688 520 9232 232 9232 352 9232 304 712 808 9232 240 Columns 241 through 255 724 9232 9232 244 736 628 1672 9232 952 9232 9232 9232 9232 4372 13120 Columns 256 through 270 256 9232 9232 9232 260 784 592 9232 264 9232 400 1204 304 808 916 Columns 271 through 285 2752 272 820 9232 9232 276 832 628 1888 280 952 424 9232 9232 9232 Columns 286 through 300 9232 4372 288 868 9232 9232 9232 9232 9232 2248 296 9232 448 9232 340 Columns 301 through 315 904 1024 3076 304 916 520 1384 308 928 9232 9232 312 9232 472 1600 Columns 316 through 330 808 952 9232 9232 320 964 9232 9232 324 976 736 9232 9232 1672 9232 Columns 331 through 345 1492 9232 9232 9232 9232 336 9232 4372 4372 340 1024 9232 9232 344 9232 Columns 346 through 360 520 9232 592 1048 9232 9232 352 9232 532 1600 356 1072 808 9232 360 Columns 361 through 375 2752 544 1636 9232 9232 9232 4192 368 1108 628 1672 372 1120 952 2536 Columns 376 through 390 9232 9232 9232 2752 9232 9232 4372 13120 384 1156 9232 9232 9232 9232 9232 Columns 391 through 405 9232 392 2248 592 9232 448 1192 9232 9232 400 1204 1024 1816 404 1216 Columns 406 through 420 916 2752 408 1384 616 9232 9232 9232 9232 9232 416 9232 628 1888 808 Columns 421 through 435 1264 952 3220 424 9232 640 2752 9232 9232 9232 4372 9232 1300 736 1960 Columns 436 through 450 9232 9232 1672 2968 9232 1492 9232 2248 9232 9232 9232 39364 448 9232 4372 Columns 451 through 465 4372 452 1360 1024 3076 456 9232 688 9232 520 1384 9232 9232 464 1396 Columns 466 through 480 9232 9232 468 1408 9232 9232 472 1600 712 3616 808 1432 9232 9232 480 Columns 481 through 495 2752 724 2176 9232 9232 9232 9232 488 4192 736 9232 628 1480 1672 14308 Columns 496 through 510 9232 1492 952 2248 9232 9232 9232 9232 9232 2752 9232 2896 4372 4372 13120 Columns 511 through 525 39364 512 1540 9232 9232 9232 9232 9232 3508 520 9232 784 9232 592 1576 Columns 526 through 540 9232 9232 528 1588 9232 9232 532 1600 1204 3616 536 1816 808 9232 916 Columns 541 through 555 1624 2752 9232 544 1636 820 2464 9232 9232 9232 4192 552 9232 832 2500 Columns 556 through 570 628 1672 1888 8080 560 1684 952 2536 564 1696 9232 9232 9232 2752 9232 Columns 571 through 585 2896 9232 9232 4372 13120 576 1732 868 2608 9232 9232 9232 3940 9232 2968 Columns 586 through 600 9232 9232 9232 9232 2248 5992 592 9232 9232 9232 596 1792 9232 9232 600 Columns 601 through 615 4372 904 5812 1024 1816 3076 9232 608 9232 916 2752 612 1840 1384 10528 Columns 616 through 630 616 9232 928 9232 9232 9232 9232 9232 624 1876 9232 9232 628 1888 1600 Columns 631 through 645 4264 808 3616 952 3220 9232 9232 9232 41524 640 2752 964 2896 9232 9232 Columns 646 through 660 9232 4372 648 9232 976 9232 736 1960 9232 9232 9232 1972 1672 2968 9232 Columns 661 through 675 9232 1492 4480 9232 2248 9232 21688 9232 9232 9232 39364 672 2752 9232 9232 Columns 676 through 690 4372 4372 4372 5812 680 39364 1024 3076 9232 9232 9232 6964 688 9232 9232 Columns 691 through 705 9232 692 2080 9232 9232 696 9232 1048 3544 9232 9232 9232 250504 704 2116 Columns 706 through 720 9232 9232 708 2128 1600 4804 712 3616 1072 3220 808 2152 9232 ...

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

b = Columns 1 through 15 4 2 16 4 16 16 52 8 52 16 52 16 40 52 160 Columns 16 through 30 16 52 52 88 20 64 52 160 24 88 40 9232 52 88 160 Columns 31 through 45 9232 32 100 52 160 52 112 88 304 40 9232 64 196 52 136 Columns 46 through 60 160 9232 48 148 88 232 52 160 9232 9232 56 196 88 304 160 Columns 61 through 75 184 9232 9232 64 196 100 304 68 208 160 9232 72 9232 112 340 Columns 76 through 90 88 232 304 808 80 244 9232 9232 84 256 196 592 88 304 136 Columns 91 through 105 9232 160 280 9232 9232 96 9232 148 448 100 304 232 9232 104 808 Columns 106 through 120 160 9232 9232 9232 9232 9232 112 340 196 520 116 352 304 808 160 Columns 121 through 135 9232 184 628 9232 9232 9232 4372 128 9232 196 592 132 400 304 916 Columns 136 through 150 136 9232 208 628 160 424 9232 9232 144 9232 9232 9232 148 448 340 Columns 151 through 165 1024 152 520 232 9232 304 472 808 9232 160 9232 244 736 9232 9232 Columns 166 through 180 9232 9232 168 4372 256 9232 196 520 592 9232 176 532 304 808 180 Columns 181 through 195 544 9232 9232 184 628 280 952 9232 9232 9232 4372 192 9232 9232 9232 Columns 196 through 210 196 592 448 9232 200 1024 304 916 232 616 9232 9232 208 628 808 Columns 211 through 225 952 212 640 9232 9232 9232 736 9232 1672 9232 9232 9232 9232 224 4372 Columns 226 through 240 340 1024 228 688 520 9232 232 9232 352 9232 304 712 808 9232 240 Columns 241 through 255 724 9232 9232 244 736 628 1672 9232 952 9232 9232 9232 9232 4372 13120 Columns 256 through 270 256 9232 9232 9232 260 784 592 9232 264 9232 400 1204 304 808 916 Columns 271 through 285 2752 272 820 9232 9232 276 832 628 1888 280 952 424 9232 9232 9232 Columns 286 through 300 9232 4372 288 868 9232 9232 9232 9232 9232 2248 296 9232 448 9232 340 Columns 301 through 315 904 1024 3076 304 916 520 1384 308 928 9232 9232 312 9232 472 1600 Columns 316 through 330 808 952 9232 9232 320 964 9232 9232 324 976 736 9232 9232 1672 9232 Columns 331 through 345 1492 9232 9232 9232 9232 336 9232 4372 4372 340 1024 9232 9232 344 9232 Columns 346 through 360 520 9232 592 1048 9232 9232 352 9232 532 1600 356 1072 808 9232 360 Columns 361 through 375 2752 544 1636 9232 9232 9232 4192 368 1108 628 1672 372 1120 952 2536 Columns 376 through 390 9232 9232 9232 2752 9232 9232 4372 13120 384 1156 9232 9232 9232 9232 9232 Columns 391 through 405 9232 392 2248 592 9232 448 1192 9232 9232 400 1204 1024 1816 404 1216 Columns 406 through 420 916 2752 408 1384 616 9232 9232 9232 9232 9232 416 9232 628 1888 808 Columns 421 through 435 1264 952 3220 424 9232 640 2752 9232 9232 9232 4372 9232 1300 736 1960 Columns 436 through 450 9232 9232 1672 2968 9232 1492 9232 2248 9232 9232 9232 39364 448 9232 4372 Columns 451 through 465 4372 452 1360 1024 3076 456 9232 688 9232 520 1384 9232 9232 464 1396 Columns 466 through 480 9232 9232 468 1408 9232 9232 472 1600 712 3616 808 1432 9232 9232 480 Columns 481 through 495 2752 724 2176 9232 9232 9232 9232 488 4192 736 9232 628 1480 1672 14308 Columns 496 through 510 9232 1492 952 2248 9232 9232 9232 9232 9232 2752 9232 2896 4372 4372 13120 Columns 511 through 525 39364 512 1540 9232 9232 9232 9232 9232 3508 520 9232 784 9232 592 1576 Columns 526 through 540 9232 9232 528 1588 9232 9232 532 1600 1204 3616 536 1816 808 9232 916 Columns 541 through 555 1624 2752 9232 544 1636 820 2464 9232 9232 9232 4192 552 9232 832 2500 Columns 556 through 570 628 1672 1888 8080 560 1684 952 2536 564 1696 9232 9232 9232 2752 9232 Columns 571 through 585 2896 9232 9232 4372 13120 576 1732 868 2608 9232 9232 9232 3940 9232 2968 Columns 586 through 600 9232 9232 9232 9232 2248 5992 592 9232 9232 9232 596 1792 9232 9232 600 Columns 601 through 615 4372 904 5812 1024 1816 3076 9232 608 9232 916 2752 612 1840 1384 10528 Columns 616 through 630 616 9232 928 9232 9232 9232 9232 9232 624 1876 9232 9232 628 1888 1600 Columns 631 through 645 4264 808 3616 952 3220 9232 9232 9232 41524 640 2752 964 2896 9232 9232 Columns 646 through 660 9232 4372 648 9232 976 9232 736 1960 9232 9232 9232 1972 1672 2968 9232 Columns 661 through 675 9232 1492 4480 9232 2248 9232 21688 9232 9232 9232 39364 672 2752 9232 9232 Columns 676 through 690 4372 4372 4372 5812 680 39364 1024 3076 9232 9232 9232 6964 688 9232 9232 Columns 691 through 705 9232 692 2080 9232 9232 696 9232 1048 3544 9232 9232 9232 250504 704 2116 Columns 706 through 720 9232 9232 708 2128 1600 4804 712 3616 1072 3220 808 2152 9232 ...