Cody

Problem 45192. check whether a number is a pentatope number

Solution 2169674

Submitted on 22 Mar 2020 by Augusto Mazzei
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
x = 1; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

y = logical 1

2   Pass
x = 5; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

y = logical 1

3   Pass
x = 125; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 y = logical 0

4   Pass
x = 5985; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 N = 1820 N = 2380 N = 3060 N = 3876 N = 4845 N = 5985 y = logical 1

5   Pass
x = 543243; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 N = 1820 N = 2380 N = 3060 N = 3876 N = 4845 N = 5985 N = 7315 N = 8855 N = 10626 N = 12650 N = 14950 N = 17550 N = 20475 N = 23751 N = 27405 N = 31465 N = 35960 N = 40920 N = 46376 N = 52360 N = 58905 N = 66045 N = 73815 N = 82251 N = 91390 N = 101270 N = 111930 N = 123410 N = 135751 N = 148995 N = 163185 N = 178365 N = 194580 N = 211876 N = 230300 N = 249900 N = 270725 N = 292825 N = 316251 N = 341055 N = 367290 N = 395010 N = 424270 N = 455126 N = 487635 N = 521855 N = 557845 y = logical 0

6   Pass
x = 7555; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 N = 1820 N = 2380 N = 3060 N = 3876 N = 4845 N = 5985 N = 7315 N = 8855 y = logical 0

7   Pass
x = 240027425; y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 N = 1820 N = 2380 N = 3060 N = 3876 N = 4845 N = 5985 N = 7315 N = 8855 N = 10626 N = 12650 N = 14950 N = 17550 N = 20475 N = 23751 N = 27405 N = 31465 N = 35960 N = 40920 N = 46376 N = 52360 N = 58905 N = 66045 N = 73815 N = 82251 N = 91390 N = 101270 N = 111930 N = 123410 N = 135751 N = 148995 N = 163185 N = 178365 N = 194580 N = 211876 N = 230300 N = 249900 N = 270725 N = 292825 N = 316251 N = 341055 N = 367290 N = 395010 N = 424270 N = 455126 N = 487635 N = 521855 N = 557845 N = 595665 N = 635376 N = 677040 N = 720720 N = 766480 N = 814385 N = 864501 N = 916895 N = 971635 N = 1028790 N = 1088430 N = 1150626 N = 1215450 N = 1282975 N = 1353275 N = 1426425 N = 1502501 N = 1581580 N = 1663740 N = 1749060 N = 1837620 N = 1929501 N = 2024785 N = 2123555 N = 2225895 N = 2331890 N = 2441626 N = 2555190 N = 2672670 N = 2794155 N = 2919735 N = 3049501 N = 3183545 N = 3321960 N = 3464840 N = 3612280 N = 3764376 N = 3921225 N = 4082925 N = 4249575 N = 4421275 N = 4598126 N = 4780230 N = 4967690 N = 5160610 N = 5359095 N = 5563251 N = 5773185 N = 5989005 N = 6210820 N = 6438740 N = 6672876 N = 6913340 N = 7160245 N = 7413705 N = 7673835 N = 7940751 N = 8214570 N = 8495410 N = 8783390 N = 9078630 N = 9381251 N = 9691375 N = 10009125 N = 10334625 N = 10668000 N = 11009376 N = 11358880 N = 11716640 N = 12082785 N = 12457445 N = 12840751 N = 13232835 N = 13633830 N = 14043870 N = 14463090 N = 14891626 N = 15329615 N = 15777195 N = 16234505 N = 16701685 N = 17178876 N = 17666220 N = 18163860 N = 18671940 N = 19190605 N = 19720001 N = 20260275 N = 20811575 N = 21374050 N = 21947850 N = 22533126 N = 23130030 N = 23738715 N = 24359335 N = 24992045 N = 25637001 N = 26294360 N = 26964280 N = 27646920 N = 28342440 N = 29051001 N = 29772765 N = 30507895 N = 31256555 N = 32018910 N = 32795126 N = 33585370 N = 34389810 N = 35208615 N = 36041955 N = 36890001 N = 37752925 N = 38630900 N = 39524100 N = 40432700 N = 41356876 N = 42296805 N = 43252665 N = 44224635 N = 45212895 N = 46217626 N = 47239010 N = 48277230 N = 49332470 N = 50404915 N = 51494751 N = 52602165 N = 53727345 N = 54870480 N = 56031760 N = 57211376 N = 58409520 N = 59626385 N = 60862165 N = 62117055 N = 63391251 N = 64684950 N = 65998350 N = 67331650 N = 68685050 N = 70058751 N = 71452955 N = 72867865 N = 74303685 N = 75760620 N = 77238876 N = 78738660 N = 80260180 N = 81803645 N = 83369265 N = 84957251 N = 86567815 N = 88201170 N = 89857530 N = 91537110 N = 93240126 N = 94966795 N = 96717335 N = 98491965 N = 100290905 N = 102114376 N = 103962600 N = 105835800 N = 107734200 N = 109658025 N = 111607501 N = 113582855 N = 115584315 N = 117612110 N = 119666470 N = 121747626 N = 123855810 N = 125991255 N = 128154195 N = 130344865 N = 132563501 N = 134810340 N = 137085620 N = 139389580 N = 141722460 N = 144084501 N = 146475945 N = 148897035 N = 151348015 N = 153829130 N = 156340626 N = 158882750 N = 161455750 N = 164059875 N = 166695375 N = 169362501 N = 172061505 N = 174792640 N = 177556160 N = 180352320 N = 183181376 N = 186043585 N = 188939205 N = 191868495 N = 194831715 N = 197829126 N = 200860990 N = 203927570 N = 207029130 N = 210165935 N = 213338251 N = 216546345 N = 219790485 N = 223070940 N = 226387980 N = 229741876 N = 233132900 N = 236561325 N = 240027425 y = logical 1

8   Pass
x = 132423525; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 N = 1820 N = 2380 N = 3060 N = 3876 N = 4845 N = 5985 N = 7315 N = 8855 N = 10626 N = 12650 N = 14950 N = 17550 N = 20475 N = 23751 N = 27405 N = 31465 N = 35960 N = 40920 N = 46376 N = 52360 N = 58905 N = 66045 N = 73815 N = 82251 N = 91390 N = 101270 N = 111930 N = 123410 N = 135751 N = 148995 N = 163185 N = 178365 N = 194580 N = 211876 N = 230300 N = 249900 N = 270725 N = 292825 N = 316251 N = 341055 N = 367290 N = 395010 N = 424270 N = 455126 N = 487635 N = 521855 N = 557845 N = 595665 N = 635376 N = 677040 N = 720720 N = 766480 N = 814385 N = 864501 N = 916895 N = 971635 N = 1028790 N = 1088430 N = 1150626 N = 1215450 N = 1282975 N = 1353275 N = 1426425 N = 1502501 N = 1581580 N = 1663740 N = 1749060 N = 1837620 N = 1929501 N = 2024785 N = 2123555 N = 2225895 N = 2331890 N = 2441626 N = 2555190 N = 2672670 N = 2794155 N = 2919735 N = 3049501 N = 3183545 N = 3321960 N = 3464840 N = 3612280 N = 3764376 N = 3921225 N = 4082925 N = 4249575 N = 4421275 N = 4598126 N = 4780230 N = 4967690 N = 5160610 N = 5359095 N = 5563251 N = 5773185 N = 5989005 N = 6210820 N = 6438740 N = 6672876 N = 6913340 N = 7160245 N = 7413705 N = 7673835 N = 7940751 N = 8214570 N = 8495410 N = 8783390 N = 9078630 N = 9381251 N = 9691375 N = 10009125 N = 10334625 N = 10668000 N = 11009376 N = 11358880 N = 11716640 N = 12082785 N = 12457445 N = 12840751 N = 13232835 N = 13633830 N = 14043870 N = 14463090 N = 14891626 N = 15329615 N = 15777195 N = 16234505 N = 16701685 N = 17178876 N = 17666220 N = 18163860 N = 18671940 N = 19190605 N = 19720001 N = 20260275 N = 20811575 N = 21374050 N = 21947850 N = 22533126 N = 23130030 N = 23738715 N = 24359335 N = 24992045 N = 25637001 N = 26294360 N = 26964280 N = 27646920 N = 28342440 N = 29051001 N = 29772765 N = 30507895 N = 31256555 N = 32018910 N = 32795126 N = 33585370 N = 34389810 N = 35208615 N = 36041955 N = 36890001 N = 37752925 N = 38630900 N = 39524100 N = 40432700 N = 41356876 N = 42296805 N = 43252665 N = 44224635 N = 45212895 N = 46217626 N = 47239010 N = 48277230 N = 49332470 N = 50404915 N = 51494751 N = 52602165 N = 53727345 N = 54870480 N = 56031760 N = 57211376 N = 58409520 N = 59626385 N = 60862165 N = 62117055 N = 63391251 N = 64684950 N = 65998350 N = 67331650 N = 68685050 N = 70058751 N = 71452955 N = 72867865 N = 74303685 N = 75760620 N = 77238876 N = 78738660 N = 80260180 N = 81803645 N = 83369265 N = 84957251 N = 86567815 N = 88201170 N = 89857530 N = 91537110 N = 93240126 N = 94966795 N = 96717335 N = 98491965 N = 100290905 N = 102114376 N = 103962600 N = 105835800 N = 107734200 N = 109658025 N = 111607501 N = 113582855 N = 115584315 N = 117612110 N = 119666470 N = 121747626 N = 123855810 N = 125991255 N = 128154195 N = 130344865 N = 132563501 y = logical 0

9   Pass
x = 5980; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 N = 1820 N = 2380 N = 3060 N = 3876 N = 4845 N = 5985 y = logical 0

10   Pass
x = 1324; y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 y = logical 0

11   Pass
x=467716275 y_correct = 1; assert(isequal(your_fcn_name(x),y_correct))

x = 467716275 N = 1 N = 5 N = 15 N = 35 N = 70 N = 126 N = 210 N = 330 N = 495 N = 715 N = 1001 N = 1365 N = 1820 N = 2380 N = 3060 N = 3876 N = 4845 N = 5985 N = 7315 N = 8855 N = 10626 N = 12650 N = 14950 N = 17550 N = 20475 N = 23751 N = 27405 N = 31465 N = 35960 N = 40920 N = 46376 N = 52360 N = 58905 N = 66045 N = 73815 N = 82251 N = 91390 N = 101270 N = 111930 N = 123410 N = 135751 N = 148995 N = 163185 N = 178365 N = 194580 N = 211876 N = 230300 N = 249900 N = 270725 N = 292825 N = 316251 N = 341055 N = 367290 N = 395010 N = 424270 N = 455126 N = 487635 N = 521855 N = 557845 N = 595665 N = 635376 N = 677040 N = 720720 N = 766480 N = 814385 N = 864501 N = 916895 N = 971635 N = 1028790 N = 1088430 N = 1150626 N = 1215450 N = 1282975 N = 1353275 N = 1426425 N = 1502501 N = 1581580 N = 1663740 N = 1749060 N = 1837620 N = 1929501 N = 2024785 N = 2123555 N = 2225895 N = 2331890 N = 2441626 N = 2555190 N = 2672670 N = 2794155 N = 2919735 N = 3049501 N = 3183545 N = 3321960 N = 3464840 N = 3612280 N = 3764376 N = 3921225 N = 4082925 N = 4249575 N = 4421275 N = 4598126 N = 4780230 N = 4967690 N = 5160610 N = 5359095 N = 5563251 N = 5773185 N = 5989005 N = 6210820 N = 6438740 N = 6672876 N = 6913340 N = 7160245 N = 7413705 N = 7673835 N = 7940751 N = 8214570 N = 8495410 N = 8783390 N = 9078630 N = 9381251 N = 9691375 N = 10009125 N = 10334625 N = 10668000 N = 11009376 N = 11358880 N = 11716640 N = 12082785 N = 12457445 N = 12840751 N = 13232835 N = 13633830 N = 14043870 N = 14463090 N = 14891626 N = 15329615 N = 15777195 N = 16234505 N = 16701685 N = 17178876 N = 17666220 N = 18163860 N = 18671940 N = 19190605 N = 19720001 N = 20260275 N = 20811575 N = 21374050 N = 21947850 N = 22533126 N = 23130030 N = 23738715 N = 24359335 N = 24992045 N = 25637001 N = 26294360 N = 26964280 N = 27646920 N = 28342440 N = 29051001 N = 29772765 N = 30507895 N = 31256555 N = 32018910 N = 32795126 N = 33585370 N = 34389810 N = 35208615 N = 36041955 N = 36890001 N = 37752925 N = 38630900 N = 39524100 N = 40432700 N = 41356876 N = 42296805 N = 43252665 N = 44224635 N = 45212895 N = 46217626 N = 47239010 N = 48277230 N = 49332470 N = 50404915 N = 51494751 N = 52602165 N = 53727345 N = 54870480 N = 56031760 N = 57211376 N = 58409520 N = 59626385 N = 60862165 N = 62117055 N = 63391251 N = 64684950 N = 65998350 N = 67331650 N = 68685050 N = 70058751 N = 71452955 N = 72867865 N = 74303685 N = 75760620 N = 77238876 N = 78738660 N = 80260180 N = 81803645 N = 83369265 N = 84957251 N = 86567815 N = 88201170 N = 89857530 N = 91537110 N = 93240126 N = 94966795 N = 96717335 N = 98491965 N = 100290905 N = 102114376 N = 103962600 N = 105835800 N = 107734200 N = 109658025 N = 111607501 N = 113582855 N = 115584315 N = 117612110 N = 119666470 N = 121747626 N = 123855810 N = 125991255 N = 128154195 N = 130344865 N = 132563501 N = 134810340 N = 137085620 N = 139389580 N = 141722460 N = 144084501 N = 146475945 N = 148897035 N = 151348015 N = 153829130 N = 156340626 N = 158882750 N = 161455750 N = 164059875 N = 166695375 N = 169362501 N = 172061505 N = 174792640 N = 177556160 N = 180352320 N = 183181376 N = 186043585 N = 188939205 N = 191868495 N = 194831715 N = 197829126 N = 200860990 N = 203927570 N = 207029130 N = 210165935 N = 213338251 N = 216546345 N = 219790485 N = 223070940 N = 226387980 N = 229741876 N = 233132900 N = 236561325 N = 240027425 N = 243531475 N = 247073751 N = 250654530 N = 254274090 N = 257932710 N = 261630670 N = 265368251 N = 269145735 N = 272963405 N = 276821545 N = 280720440 N = 284660376 N = 288641640 N = 292664520 N = 296729305 N = 300836285 N = 304985751 N = 309177995 N = 313413310 N = 317691990 N = 322014330 N = 326380626 N = 330791175 N = 335246275 N = 339746225 N = 344291325 N = 348881876 N = 353518180 N = 358200540 N = 362929260 N = 367704645 N = 372527001 N = 377396635 N = 382313855 N = 387278970 N = 392292290 N = 397354126 N = 402464790 N = 407624595 N = 412833855 N = 418092885 N = 423402001 N = 428761520 N = 434171760 N = 439633040 N = 445145680 N = 450710001 N = 456326325 N = 461994975 N = 467716275 y = logical 1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!