Cody

# Problem 234. Project Euler: Problem 3, Largest prime factor

Solution 2976370

Submitted on 21 Sep 2020
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   Fail
x = 600851475143; y_correct = 6857; assert(isequal(euler003(x),y_correct))

x = 6.0085e+11 numbers = Columns 1 through 14 3 5 7 9 11 13 15 17 19 21 23 25 27 29 Columns 15 through 28 31 33 35 37 39 41 43 45 47 49 51 53 55 57 Columns 29 through 42 59 61 63 65 67 69 71 73 75 77 79 81 83 85 Columns 43 through 56 87 89 91 93 95 97 99 101 103 105 107 109 111 113 Columns 57 through 70 115 117 119 121 123 125 127 129 131 133 135 137 139 141 Columns 71 through 84 143 145 147 149 151 153 155 157 159 161 163 165 167 169 Columns 85 through 98 171 173 175 177 179 181 183 185 187 189 191 193 195 197 Columns 99 through 112 199 201 203 205 207 209 211 213 215 217 219 221 223 225 Columns 113 through 126 227 229 231 233 235 237 239 241 243 245 247 249 251 253 Columns 127 through 140 255 257 259 261 263 265 267 269 271 273 275 277 279 281 Columns 141 through 154 283 285 287 289 291 293 295 297 299 301 303 305 307 309 Columns 155 through 168 311 313 315 317 319 321 323 325 327 329 331 333 335 337 Columns 169 through 182 339 341 343 345 347 349 351 353 355 357 359 361 363 365 Columns 183 through 196 367 369 371 373 375 377 379 381 383 385 387 389 391 393 Columns 197 through 210 395 397 399 401 403 405 407 409 411 413 415 417 419 421 Columns 211 through 224 423 425 427 429 431 433 435 437 439 441 443 445 447 449 Columns 225 through 238 451 453 455 457 459 461 463 465 467 469 471 473 475 477 Columns 239 through 252 479 481 483 485 487 489 491 493 495 497 499 501 503 505 Columns 253 through 266 507 509 511 513 515 517 519 521 523 525 527 529 531 533 Columns 267 through 280 535 537 539 541 543 545 547 549 551 553 555 557 559 561 Columns 281 through 294 563 565 567 569 571 573 575 577 579 581 583 585 587 589 Columns 295 through 308 591 593 595 597 599 601 603 605 607 609 611 613 615 617 Columns 309 through 322 619 621 623 625 627 629 631 633 635 637 639 641 643 645 Columns 323 through 336 647 649 651 653 655 657 659 661 663 665 667 669 671 673 Columns 337 through 350 675 677 679 681 683 685 687 689 691 693 695 697 699 701 Columns 351 through 364 703 705 707 709 711 713 715 717 719 721 723 725 727 729 Columns 365 through 378 731 733 735 737 739 741 743 745 747 749 751 753 755 757 Columns 379 through 392 759 761 763 765 767 769 771 773 775 777 779 781 783 785 Columns 393 through 406 787 789 791 793 795 797 799 801 803 805 807 809 811 813 Columns 407 through 420 815 817 819 821 823 825 827 829 831 833 835 837 839 841 Columns 421 through 434 843 845 847 849 851 853 855 857 859 861 863 865 867 869 Columns 435 through 448 871 873 875 877 879 881 883 885 887 889 891 893 895 897 Columns 449 through 462 899 901 903 905 907 909 911 913 915 917 919 921 923 925 Columns 463 through 476 927 929 931 933 935 937 939 941 943 945 947 949 951 953 Columns 477 through 490 955 957 959 961 963 965 967 969 971 973 975 977 979 981 Columns 491 through 504 983 985 987 989 991 993 995 997 999 1001 1003 1005 1007 1009 Columns 505 through 518 1011 1013 1015 1017 1019 1021 1023 1025 1027 1029 1031 1033 1035 1037 Columns 519 through 532 1039 1041 1043 1045 1047 1049 1051 1053 1055 1057 1059 1061 1063 1065 Columns 533 through 546 1067 1069 1071 1073 1075 1077 1079 1081 1083 1085 1087 1089 1091 1093 Columns 547 through 560 1095 1097 1099 1101 1103 1105 1107 1109 1111 1113 1115 1117 1119 1121 Columns 561 through 574 1123 1125 1127 1129 1131 1133 1135 1137 1139 1141 1143 1145 1147 1149 Columns 575 through 588 1151 1153 1155 1157 1159 1161 1163 1165 1167 1169 1171 1173 1175 1177 Columns 589 through 602 1179 1181 1183 1185 1187 1189 1191 1193 1195 1197 1199 1201 1203 1205 Columns 603 through 616 1207 1209 1211 1213 1215 1217 1219 1221 1223 1225 1227 1229 1231 1233 Columns 617 through 630 1235 1237 1239 1241 1243 1245 1247 1249 1251 1253 1255 1257 1259 1261 Columns 631 through 644 1263 1265 1267 1269 1271 1273 1275 1277 1279 1281 1283 1285 1287 1289 Columns 645 through 658 1291 1293 1295 1297 1299 1301 1303 1305 1307 1309 1311 1313 1315 1317 Columns 659 through 672 1319 1321 1323 1325 1327 1329 1331 1333 1335 1337 1339 1341 1343 1345 Columns 673 through 686 1347 1349 1351 1353 1355 1357 1359 1361 1363 1365 1367 1369 1371 1373 Columns 687 through 700 1375 1377 1379 1381 1383 1385 1387 1389 1391 1393 1395 1397 1399 1401 Columns 701 through 714 1403 1405 1407 1409 1411 1413 1415 1417 141...

Output argument "y" (and maybe others) not assigned during call to "euler003". Error in Test1 (line 3) assert(isequal(euler003(x),y_correct))

2   Fail
x = 3916767508299776; y_correct = 457; assert(isequal(euler003(x),y_correct))

x = 3.9168e+15 maxPrime = 2 x = 1.9584e+15 maxPrime = 2 x = 9.7919e+14 maxPrime = 2 x = 4.8960e+14 maxPrime = 2 x = 2.4480e+14 maxPrime = 2 x = 1.2240e+14 maxPrime = 2 x = 6.1199e+13 maxPrime = 2 x = 3.0600e+13 maxPrime = 2 x = 1.5300e+13 maxPrime = 2 x = 7.6499e+12 maxPrime = 2 x = 3.8250e+12 maxPrime = 2 x = 1.9125e+12 maxPrime = 2 x = 9.5624e+11 maxPrime = 2 x = 4.7812e+11 maxPrime = 2 x = 2.3906e+11 maxPrime = 2 x = 1.1953e+11 maxPrime = 2 x = 5.9765e+10 maxPrime = 2 x = 2.9883e+10 maxPrime = 2 x = 1.4941e+10 maxPrime = 2 x = 7.4706e+09 maxPrime = 2 x = 3.7353e+09 maxPrime = 2 x = 1.8677e+09 maxPrime = 2 x = 933830144 maxPrime = 2 x = 466915072 maxPrime = 2 x = 233457536 maxPrime = 2 x = 116728768 maxPrime = 2 x = 58364384 maxPrime = 2 x = 29182192 maxPrime = 2 x = 14591096 maxPrime = 2 x = 7295548 maxPrime = 2 x = 3647774 maxPrime = 2 x = 1823887 numbers = Columns 1 through 14 3 5 7 9 11 13 15 17 19 21 23 25 27 29 Columns 15 through 28 31 33 35 37 39 41 43 45 47 49 51 53 55 57 Columns 29 through 42 59 61 63 65 67 69 71 73 75 77 79 81 83 85 Columns 43 through 56 87 89 91 93 95 97 99 101 103 105 107 109 111 113 Columns 57 through 70 115 117 119 121 123 125 127 129 131 133 135 137 139 141 Columns 71 through 84 143 145 147 149 151 153 155 157 159 161 163 165 167 169 Columns 85 through 98 171 173 175 177 179 181 183 185 187 189 191 193 195 197 Columns 99 through 112 199 201 203 205 207 209 211 213 215 217 219 221 223 225 Columns 113 through 126 227 229 231 233 235 237 239 241 243 245 247 249 251 253 Columns 127 through 140 255 257 259 261 263 265 267 269 271 273 275 277 279 281 Columns 141 through 154 283 285 287 289 291 293 295 297 299 301 303 305 307 309 Columns 155 through 168 311 313 315 317 319 321 323 325 327 329 331 333 335 337 Columns 169 through 182 339 341 343 345 347 349 351 353 355 357 359 361 363 365 Columns 183 through 196 367 369 371 373 375 377 379 381 383 385 387 389 391 393 Columns 197 through 210 395 397 399 401 403 405 407 409 411 413 415 417 419 421 Columns 211 through 224 423 425 427 429 431 433 435 437 439 441 443 445 447 449 Columns 225 through 238 451 453 455 457 459 461 463 465 467 469 471 473 475 477 Columns 239 through 252 479 481 483 485 487 489 491 493 495 497 499 501 503 505 Columns 253 through 266 507 509 511 513 515 517 519 521 523 525 527 529 531 533 Columns 267 through 280 535 537 539 541 543 545 547 549 551 553 555 557 559 561 Columns 281 through 294 563 565 567 569 571 573 575 577 579 581 583 585 587 589 Columns 295 through 308 591 593 595 597 599 601 603 605 607 609 611 613 615 617 Columns 309 through 322 619 621 623 625 627 629 631 633 635 637 639 641 643 645 Columns 323 through 336 647 649 651 653 655 657 659 661 663 665 667 669 671 673 Columns 337 through 350 675 677 679 681 683 685 687 689 691 693 695 697 699 701 Columns 351 through 364 703 705 707 709 711 713 715 717 719 721 723 725 727 729 Columns 365 through 378 731 733 735 737 739 741 743 745 747 749 751 753 755 757 Columns 379 through 392 759 761 763 765 767 769 771 773 775 777 779 781 783 785 Columns 393 through 406 787 789 791 793 795 797 799 801 803 805 807 809 811 813 Columns 407 through 420 815 817 819 821 823 825 827 829 831 833 835 837 839 841 Columns 421 through 434 843 845 847 849 851 853 855 857 859 861 863 865 867 869 Columns 435 through 448 871 873 875 877 879 881 883 885 887 889 891 893 895 897 Columns 449 through 462 899 901 903 905 907 909 911 913 915 917 919 921 923 925 Columns 463 through 476 927 929 931 933 935 937 939 941 943 945 947 949 951 953 Columns 477 through 490 955 957 959 961 963 965 967 969 971 973 975 977 979 981 Columns 491 through 504 983 985 987 989 991 993 995 997 999 1001 1003 1005 1007 1009 Columns 505 through 518 1011 1013 1015 1017 1019 1021 1023 1025 1027 1029 1031 1033 1035 1037 Columns 519 through 532 1039 1041 1043 1045 1047 1049 1051 1053 1055 1057 1059 1061 1063 1065 Columns 533 through 546 1067 1069 1071 1073 1075 1077 1079 1081 1083 1085 1087 1089 1091 1093 Columns 547 through 560 1095 1097 1099 1101 1103 1105 1107 1109 1111 1113 1115 1117 1119 1121 Columns 561 through 574 1123 1125 1127 1129 1131 1133 1135 1137 1139 1141 1143 1145 1147 1149 Columns 575 through 588 1151 1153 1155 1157 1159 1161 1163 1165 1167 1169 1171 1173 1175 1177 Columns 589 through 602 1179 1181 1183 1185 1187 1189 1191 1193 1195 1197 1199 1201 1203 1205 Columns 603 through 616 1207 1209 1211 1213 1215 1217 1219 1221 1223 1225 1227 1229 1231 1233 Columns 617 through 63...

Output argument "y" (and maybe others) not assigned during call to "euler003". Error in Test2 (line 3) assert(isequal(euler003(x),y_correct))

3   Fail
x = 32167675; y_correct = 1286707; assert(isequal(euler003(x),y_correct))

x = 32167675 numbers = Columns 1 through 14 3 5 7 9 11 13 15 17 19 21 23 25 27 29 Columns 15 through 28 31 33 35 37 39 41 43 45 47 49 51 53 55 57 Columns 29 through 42 59 61 63 65 67 69 71 73 75 77 79 81 83 85 Columns 43 through 56 87 89 91 93 95 97 99 101 103 105 107 109 111 113 Columns 57 through 70 115 117 119 121 123 125 127 129 131 133 135 137 139 141 Columns 71 through 84 143 145 147 149 151 153 155 157 159 161 163 165 167 169 Columns 85 through 98 171 173 175 177 179 181 183 185 187 189 191 193 195 197 Columns 99 through 112 199 201 203 205 207 209 211 213 215 217 219 221 223 225 Columns 113 through 126 227 229 231 233 235 237 239 241 243 245 247 249 251 253 Columns 127 through 140 255 257 259 261 263 265 267 269 271 273 275 277 279 281 Columns 141 through 154 283 285 287 289 291 293 295 297 299 301 303 305 307 309 Columns 155 through 168 311 313 315 317 319 321 323 325 327 329 331 333 335 337 Columns 169 through 182 339 341 343 345 347 349 351 353 355 357 359 361 363 365 Columns 183 through 196 367 369 371 373 375 377 379 381 383 385 387 389 391 393 Columns 197 through 210 395 397 399 401 403 405 407 409 411 413 415 417 419 421 Columns 211 through 224 423 425 427 429 431 433 435 437 439 441 443 445 447 449 Columns 225 through 238 451 453 455 457 459 461 463 465 467 469 471 473 475 477 Columns 239 through 252 479 481 483 485 487 489 491 493 495 497 499 501 503 505 Columns 253 through 266 507 509 511 513 515 517 519 521 523 525 527 529 531 533 Columns 267 through 280 535 537 539 541 543 545 547 549 551 553 555 557 559 561 Columns 281 through 294 563 565 567 569 571 573 575 577 579 581 583 585 587 589 Columns 295 through 308 591 593 595 597 599 601 603 605 607 609 611 613 615 617 Columns 309 through 322 619 621 623 625 627 629 631 633 635 637 639 641 643 645 Columns 323 through 336 647 649 651 653 655 657 659 661 663 665 667 669 671 673 Columns 337 through 350 675 677 679 681 683 685 687 689 691 693 695 697 699 701 Columns 351 through 364 703 705 707 709 711 713 715 717 719 721 723 725 727 729 Columns 365 through 378 731 733 735 737 739 741 743 745 747 749 751 753 755 757 Columns 379 through 392 759 761 763 765 767 769 771 773 775 777 779 781 783 785 Columns 393 through 406 787 789 791 793 795 797 799 801 803 805 807 809 811 813 Columns 407 through 420 815 817 819 821 823 825 827 829 831 833 835 837 839 841 Columns 421 through 434 843 845 847 849 851 853 855 857 859 861 863 865 867 869 Columns 435 through 448 871 873 875 877 879 881 883 885 887 889 891 893 895 897 Columns 449 through 462 899 901 903 905 907 909 911 913 915 917 919 921 923 925 Columns 463 through 476 927 929 931 933 935 937 939 941 943 945 947 949 951 953 Columns 477 through 490 955 957 959 961 963 965 967 969 971 973 975 977 979 981 Columns 491 through 504 983 985 987 989 991 993 995 997 999 1001 1003 1005 1007 1009 Columns 505 through 518 1011 1013 1015 1017 1019 1021 1023 1025 1027 1029 1031 1033 1035 1037 Columns 519 through 532 1039 1041 1043 1045 1047 1049 1051 1053 1055 1057 1059 1061 1063 1065 Columns 533 through 546 1067 1069 1071 1073 1075 1077 1079 1081 1083 1085 1087 1089 1091 1093 Columns 547 through 560 1095 1097 1099 1101 1103 1105 1107 1109 1111 1113 1115 1117 1119 1121 Columns 561 through 574 1123 1125 1127 1129 1131 1133 1135 1137 1139 1141 1143 1145 1147 1149 Columns 575 through 588 1151 1153 1155 1157 1159 1161 1163 1165 1167 1169 1171 1173 1175 1177 Columns 589 through 602 1179 1181 1183 1185 1187 1189 1191 1193 1195 1197 1199 1201 1203 1205 Columns 603 through 616 1207 1209 1211 1213 1215 1217 1219 1221 1223 1225 1227 1229 1231 1233 Columns 617 through 630 1235 1237 1239 1241 1243 1245 1247 1249 1251 1253 1255 1257 1259 1261 Columns 631 through 644 1263 1265 1267 1269 1271 1273 1275 1277 1279 1281 1283 1285 1287 1289 Columns 645 through 658 1291 1293 1295 1297 1299 1301 1303 1305 1307 1309 1311 1313 1315 1317 Columns 659 through 672 1319 1321 1323 1325 1327 1329 1331 1333 1335 1337 1339 1341 1343 1345 Columns 673 through 686 1347 1349 1351 1353 1355 1357 1359 1361 1363 1365 1367 1369 1371 1373 Columns 687 through 700 1375 1377 1379 1381 1383 1385 1387 1389 1391 1393 1395 1397 1399 1401 Columns 701 through 714 1403 1405 1407 1409 1411 1413 1415 1417 1419...

Output argument "y" (and maybe others) not assigned during call to "euler003". Error in Test3 (line 3) assert(isequal(euler003(x),y_correct))

4   Fail
x = uint64(321676750829977632); y_correct = 206830397; assert(isequal(euler003(x),y_correct))

x = 3.7475e-287 numbers = 1×0 empty double row vector

Output argument "y" (and maybe others) not assigned during call to "euler003". Error in Test4 (line 3) assert(isequal(euler003(x),y_correct))

5   Fail
x = 321676755; y_correct = 5639; assert(isequal(euler003(x),y_correct))

x = 321676755 numbers = Columns 1 through 14 3 5 7 9 11 13 15 17 19 21 23 25 27 29 Columns 15 through 28 31 33 35 37 39 41 43 45 47 49 51 53 55 57 Columns 29 through 42 59 61 63 65 67 69 71 73 75 77 79 81 83 85 Columns 43 through 56 87 89 91 93 95 97 99 101 103 105 107 109 111 113 Columns 57 through 70 115 117 119 121 123 125 127 129 131 133 135 137 139 141 Columns 71 through 84 143 145 147 149 151 153 155 157 159 161 163 165 167 169 Columns 85 through 98 171 173 175 177 179 181 183 185 187 189 191 193 195 197 Columns 99 through 112 199 201 203 205 207 209 211 213 215 217 219 221 223 225 Columns 113 through 126 227 229 231 233 235 237 239 241 243 245 247 249 251 253 Columns 127 through 140 255 257 259 261 263 265 267 269 271 273 275 277 279 281 Columns 141 through 154 283 285 287 289 291 293 295 297 299 301 303 305 307 309 Columns 155 through 168 311 313 315 317 319 321 323 325 327 329 331 333 335 337 Columns 169 through 182 339 341 343 345 347 349 351 353 355 357 359 361 363 365 Columns 183 through 196 367 369 371 373 375 377 379 381 383 385 387 389 391 393 Columns 197 through 210 395 397 399 401 403 405 407 409 411 413 415 417 419 421 Columns 211 through 224 423 425 427 429 431 433 435 437 439 441 443 445 447 449 Columns 225 through 238 451 453 455 457 459 461 463 465 467 469 471 473 475 477 Columns 239 through 252 479 481 483 485 487 489 491 493 495 497 499 501 503 505 Columns 253 through 266 507 509 511 513 515 517 519 521 523 525 527 529 531 533 Columns 267 through 280 535 537 539 541 543 545 547 549 551 553 555 557 559 561 Columns 281 through 294 563 565 567 569 571 573 575 577 579 581 583 585 587 589 Columns 295 through 308 591 593 595 597 599 601 603 605 607 609 611 613 615 617 Columns 309 through 322 619 621 623 625 627 629 631 633 635 637 639 641 643 645 Columns 323 through 336 647 649 651 653 655 657 659 661 663 665 667 669 671 673 Columns 337 through 350 675 677 679 681 683 685 687 689 691 693 695 697 699 701 Columns 351 through 364 703 705 707 709 711 713 715 717 719 721 723 725 727 729 Columns 365 through 378 731 733 735 737 739 741 743 745 747 749 751 753 755 757 Columns 379 through 392 759 761 763 765 767 769 771 773 775 777 779 781 783 785 Columns 393 through 406 787 789 791 793 795 797 799 801 803 805 807 809 811 813 Columns 407 through 420 815 817 819 821 823 825 827 829 831 833 835 837 839 841 Columns 421 through 434 843 845 847 849 851 853 855 857 859 861 863 865 867 869 Columns 435 through 448 871 873 875 877 879 881 883 885 887 889 891 893 895 897 Columns 449 through 462 899 901 903 905 907 909 911 913 915 917 919 921 923 925 Columns 463 through 476 927 929 931 933 935 937 939 941 943 945 947 949 951 953 Columns 477 through 490 955 957 959 961 963 965 967 969 971 973 975 977 979 981 Columns 491 through 504 983 985 987 989 991 993 995 997 999 1001 1003 1005 1007 1009 Columns 505 through 518 1011 1013 1015 1017 1019 1021 1023 1025 1027 1029 1031 1033 1035 1037 Columns 519 through 532 1039 1041 1043 1045 1047 1049 1051 1053 1055 1057 1059 1061 1063 1065 Columns 533 through 546 1067 1069 1071 1073 1075 1077 1079 1081 1083 1085 1087 1089 1091 1093 Columns 547 through 560 1095 1097 1099 1101 1103 1105 1107 1109 1111 1113 1115 1117 1119 1121 Columns 561 through 574 1123 1125 1127 1129 1131 1133 1135 1137 1139 1141 1143 1145 1147 1149 Columns 575 through 588 1151 1153 1155 1157 1159 1161 1163 1165 1167 1169 1171 1173 1175 1177 Columns 589 through 602 1179 1181 1183 1185 1187 1189 1191 1193 1195 1197 1199 1201 1203 1205 Columns 603 through 616 1207 1209 1211 1213 1215 1217 1219 1221 1223 1225 1227 1229 1231 1233 Columns 617 through 630 1235 1237 1239 1241 1243 1245 1247 1249 1251 1253 1255 1257 1259 1261 Columns 631 through 644 1263 1265 1267 1269 1271 1273 1275 1277 1279 1281 1283 1285 1287 1289 Columns 645 through 658 1291 1293 1295 1297 1299 1301 1303 1305 1307 1309 1311 1313 1315 1317 Columns 659 through 672 1319 1321 1323 1325 1327 1329 1331 1333 1335 1337 1339 1341 1343 1345 Columns 673 through 686 1347 1349 1351 1353 1355 1357 1359 1361 1363 1365 1367 1369 1371 1373 Columns 687 through 700 1375 1377 1379 1381 1383 1385 1387 1389 1391 1393 1395 1397 1399 1401 Columns 701 through 714 1403 1405 1407 1409 1411 1413 1415 1417 1419...

Output argument "y" (and maybe others) not assigned during call to "euler003". Error in Test5 (line 3) assert(isequal(euler003(x),y_correct))

6   Fail
x = 361125; y_correct = 107; assert(isequal(euler003(x),y_correct))

x = 361125 numbers = Columns 1 through 29 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 Columns 30 through 58 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 117 Columns 59 through 87 119 121 123 125 127 129 131 133 135 137 139 141 143 145 147 149 151 153 155 157 159 161 163 165 167 169 171 173 175 Columns 88 through 116 177 179 181 183 185 187 189 191 193 195 197 199 201 203 205 207 209 211 213 215 217 219 221 223 225 227 229 231 233 Columns 117 through 145 235 237 239 241 243 245 247 249 251 253 255 257 259 261 263 265 267 269 271 273 275 277 279 281 283 285 287 289 291 Columns 146 through 174 293 295 297 299 301 303 305 307 309 311 313 315 317 319 321 323 325 327 329 331 333 335 337 339 341 343 345 347 349 Columns 175 through 203 351 353 355 357 359 361 363 365 367 369 371 373 375 377 379 381 383 385 387 389 391 393 395 397 399 401 403 405 407 Columns 204 through 232 409 411 413 415 417 419 421 423 425 427 429 431 433 435 437 439 441 443 445 447 449 451 453 455 457 459 461 463 465 Columns 233 through 261 467 469 471 473 475 477 479 481 483 485 487 489 491 493 495 497 499 501 503 505 507 509 511 513 515 517 519 521 523 Columns 262 through 290 525 527 529 531 533 535 537 539 541 543 545 547 549 551 553 555 557 559 561 563 565 567 569 571 573 575 577 579 581 Columns 291 through 300 583 585 587 589 591 593 595 597 599 601 maxPrime = 3 x = 120375 maxPrime = 3 x = 40125 maxPrime = 3 x = 13375 maxPrime = 5 x = 2675 maxPrime = 5 x = 535 maxPrime = 5 x = 107 maxPrime = 107 x = 1

Output argument "y" (and maybe others) not assigned during call to "euler003". Error in Test6 (line 3) assert(isequal(euler003(x),y_correct))

7   Fail
x = 13916767508299776; y_correct = 98779; assert(isequal(euler003(x),y_correct))

x = 1.3917e+16 maxPrime = 2 x = 6.9584e+15 maxPrime = 2 x = 3.4792e+15 maxPrime = 2 x = 1.7396e+15 maxPrime = 2 x = 8.6980e+14 maxPrime = 2 x = 4.3490e+14 maxPrime = 2 x = 2.1745e+14 maxPrime = 2 x = 1.0872e+14 maxPrime = 2 x = 5.4362e+13 maxPrime = 2 x = 2.7181e+13 maxPrime = 2 x = 1.3591e+13 maxPrime = 2 x = 6.7953e+12 maxPrime = 2 x = 3.3976e+12 maxPrime = 2 x = 1.6988e+12 maxPrime = 2 x = 8.4941e+11 maxPrime = 2 x = 4.2471e+11 maxPrime = 2 x = 2.1235e+11 numbers = Columns 1 through 14 3 5 7 9 11 13 15 17 19 21 23 25 27 29 Columns 15 through 28 31 33 35 37 39 41 43 45 47 49 51 53 55 57 Columns 29 through 42 59 61 63 65 67 69 71 73 75 77 79 81 83 85 Columns 43 through 56 87 89 91 93 95 97 99 101 103 105 107 109 111 113 Columns 57 through 70 115 117 119 121 123 125 127 129 131 133 135 137 139 141 Columns 71 through 84 143 145 147 149 151 153 155 157 159 161 163 165 167 169 Columns 85 through 98 171 173 175 177 179 181 183 185 187 189 191 193 195 197 Columns 99 through 112 199 201 203 205 207 209 211 213 215 217 219 221 223 225 Columns 113 through 126 227 229 231 233 235 237 239 241 243 245 247 249 251 253 Columns 127 through 140 255 257 259 261 263 265 267 269 271 273 275 277 279 281 Columns 141 through 154 283 285 287 289 291 293 295 297 299 301 303 305 307 309 Columns 155 through 168 311 313 315 317 319 321 323 325 327 329 331 333 335 337 Columns 169 through 182 339 341 343 345 347 349 351 353 355 357 359 361 363 365 Columns 183 through 196 367 369 371 373 375 377 379 381 383 385 387 389 391 393 Columns 197 through 210 395 397 399 401 403 405 407 409 411 413 415 417 419 421 Columns 211 through 224 423 425 427 429 431 433 435 437 439 441 443 445 447 449 Columns 225 through 238 451 453 455 457 459 461 463 465 467 469 471 473 475 477 Columns 239 through 252 479 481 483 485 487 489 491 493 495 497 499 501 503 505 Columns 253 through 266 507 509 511 513 515 517 519 521 523 525 527 529 531 533 Columns 267 through 280 535 537 539 541 543 545 547 549 551 553 555 557 559 561 Columns 281 through 294 563 565 567 569 571 573 575 577 579 581 583 585 587 589 Columns 295 through 308 591 593 595 597 599 601 603 605 607 609 611 613 615 617 Columns 309 through 322 619 621 623 625 627 629 631 633 635 637 639 641 643 645 Columns 323 through 336 647 649 651 653 655 657 659 661 663 665 667 669 671 673 Columns 337 through 350 675 677 679 681 683 685 687 689 691 693 695 697 699 701 Columns 351 through 364 703 705 707 709 711 713 715 717 719 721 723 725 727 729 Columns 365 through 378 731 733 735 737 739 741 743 745 747 749 751 753 755 757 Columns 379 through 392 759 761 763 765 767 769 771 773 775 777 779 781 783 785 Columns 393 through 406 787 789 791 793 795 797 799 801 803 805 807 809 811 813 Columns 407 through 420 815 817 819 821 823 825 827 829 831 833 835 837 839 841 Columns 421 through 434 843 845 847 849 851 853 855 857 859 861 863 865 867 869 Columns 435 through 448 871 873 875 877 879 881 883 885 887 889 891 893 895 897 Columns 449 through 462 899 901 903 905 907 909 911 913 915 917 919 921 923 925 Columns 463 through 476 927 929 931 933 935 937 939 941 943 945 947 949 951 953 Columns 477 through 490 955 957 959 961 963 965 967 969 971 973 975 977 979 981 Columns 491 through 504 983 985 987 989 991 993 995 997 999 1001 1003 1005 1007 1009 Columns 505 through 518 1011 1013 1015 1017 1019 1021 1023 1025 1027 1029 1031 1033 1035 1037 Columns 519 through 532 1039 1041 1043 1045 1047 1049 1051 1053 1055 1057 1059 1061 1063 1065 Columns 533 through 546 1067 1069 1071 1073 1075 1077 1079 1081 1083 1085 1087 1089 1091 1093 Columns 547 through 560 1095 1097 1099 1101 1103 1105 1107 1109 1111 1113 1115 1117 1119 1121 Columns 561 through 574 1123 1125 1127 1129 1131 1133 1135 1137 1139 1141 1143 1145 1147 1149 Columns 575 through 588 1151 1153 1155 1157 1159 1161 1163 1165 1167 1169 1171 1173 1175 1177 Columns 589 through 602 1179 1181 1183 1185 1187 1189 1191 1193 1195 1197 1199 1201 1203 1205 Columns 603 through 616 1207 1209 1211 1213 1215 1217 1219 1221 1223 1225 1227 1229 1231 1233 Columns 617 through 630 1235 1237 1239 1241 1243 1245 1247 1249 1251 1253 1255 1257 1259 1261 Columns 631 through 644 1263 1265 1267 1269 1271 1273 1275 1277 1279 1281 1283 1285 1287 1289 Columns 645 through 658 1291 1293 1295 1297 1299 1301 1303 1305 1307 1309 1311 1313 1315 1317 Columns 659 through 672 1319 1321 ...

Output argument "y" (and maybe others) not assigned during call to "euler003". Error in Test7 (line 3) assert(isequal(euler003(x),y_correct))

### Community Treasure Hunt

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

Start Hunting!