Cody

# Problem 1096. Largest Twin Primes

Solution 1179155

Submitted on 3 May 2017 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 = 1001; y_correct = [881 883]; assert(isequal(your_fcn_name(x),y_correct))

M = 1001 M = 999 M = 997 M = 995 M = 993 M = 991 M = 989 M = 987 M = 985 M = 983 M = 981 M = 979 M = 977 M = 975 M = 973 M = 971 M = 969 M = 967 M = 965 M = 963 M = 961 M = 959 M = 957 M = 955 M = 953 M = 951 M = 949 M = 947 M = 945 M = 943 M = 941 M = 939 M = 937 M = 935 M = 933 M = 931 M = 929 M = 927 M = 925 M = 923 M = 921 M = 919 M = 917 M = 915 M = 913 M = 911 M = 909 M = 907 M = 905 M = 903 M = 901 M = 899 M = 897 M = 895 M = 893 M = 891 M = 889 M = 887 M = 885 M = 883 y = 881 883

2   Pass
x = 1964; y_correct = [1949 1951]; assert(isequal(your_fcn_name(x),y_correct))

M = 1963 M = 1961 M = 1959 M = 1957 M = 1955 M = 1953 M = 1951 y = 1949 1951

3   Pass
x = 123456789; y_correct = [123456209 123456211]; assert(isequal(your_fcn_name(x),y_correct))

M = 123456789 M = 123456787 M = 123456785 M = 123456783 M = 123456781 M = 123456779 M = 123456777 M = 123456775 M = 123456773 M = 123456771 M = 123456769 M = 123456767 M = 123456765 M = 123456763 M = 123456761 M = 123456759 M = 123456757 M = 123456755 M = 123456753 M = 123456751 M = 123456749 M = 123456747 M = 123456745 M = 123456743 M = 123456741 M = 123456739 M = 123456737 M = 123456735 M = 123456733 M = 123456731 M = 123456729 M = 123456727 M = 123456725 M = 123456723 M = 123456721 M = 123456719 M = 123456717 M = 123456715 M = 123456713 M = 123456711 M = 123456709 M = 123456707 M = 123456705 M = 123456703 M = 123456701 M = 123456699 M = 123456697 M = 123456695 M = 123456693 M = 123456691 M = 123456689 M = 123456687 M = 123456685 M = 123456683 M = 123456681 M = 123456679 M = 123456677 M = 123456675 M = 123456673 M = 123456671 M = 123456669 M = 123456667 M = 123456665 M = 123456663 M = 123456661 M = 123456659 M = 123456657 M = 123456655 M = 123456653 M = 123456651 M = 123456649 M = 123456647 M = 123456645 M = 123456643 M = 123456641 M = 123456639 M = 123456637 M = 123456635 M = 123456633 M = 123456631 M = 123456629 M = 123456627 M = 123456625 M = 123456623 M = 123456621 M = 123456619 M = 123456617 M = 123456615 M = 123456613 M = 123456611 M = 123456609 M = 123456607 M = 123456605 M = 123456603 M = 123456601 M = 123456599 M = 123456597 M = 123456595 M = 123456593 M = 123456591 M = 123456589 M = 123456587 M = 123456585 M = 123456583 M = 123456581 M = 123456579 M = 123456577 M = 123456575 M = 123456573 M = 123456571 M = 123456569 M = 123456567 M = 123456565 M = 123456563 M = 123456561 M = 123456559 M = 123456557 M = 123456555 M = 123456553 M = 123456551 M = 123456549 M = 123456547 M = 123456545 M = 123456543 M = 123456541 M = 123456539 M = 123456537 M = 123456535 M = 123456533 M = 123456531 M = 123456529 M = 123456527 M = 123456525 M = 123456523 M = 123456521 M = 123456519 M = 123456517 M = 123456515 M = 123456513 M = 123456511 M = 123456509 M = 123456507 M = 123456505 M = 123456503 M = 123456501 M = 123456499 M = 123456497 M = 123456495 M = 123456493 M = 123456491 M = 123456489 M = 123456487 M = 123456485 M = 123456483 M = 123456481 M = 123456479 M = 123456477 M = 123456475 M = 123456473 M = 123456471 M = 123456469 M = 123456467 M = 123456465 M = 123456463 M = 123456461 M = 123456459 M = 123456457 M = 123456455 M = 123456453 M = 123456451 M = 123456449 M = 123456447 M = 123456445 M = 123456443 M = 123456441 M = 123456439 M = 123456437 M = 123456435 M = 123456433 M = 123456431 M = 123456429 M = 123456427 M = 123456425 M = 123456423 M = 123456421 M = 123456419 M = 123456417 M = 123456415 M = 123456413 M = 123456411 M = 123456409 M = 123456407 M = 123456405 M = 123456403 M = 123456401 M = 123456399 M = 123456397 M = 123456395 M = 123456393 M = 123456391 M = 123456389 M = 123456387 M = 123456385 M = 123456383 M = 123456381 M = 123456379 M = 123456377 M = 123456375 M = 123456373 M = 123456371 M = 123456369 M = 123456367 M = 123456365 M = 123456363 M = 123456361 M = 123456359 M = 123456357 M = 123456355 M = 123456353 M = 123456351 M = 123456349 M = 123456347 M = 123456345 M = 123456343 M = 123456341 M = 123456339 M = 123456337 M = 123456335 M = 123456333 M = 123456331 M = 123456329 M = 123456327 M = 123456325 M = 123456323 M = 123456321 M = 123456319 M = 123456317 M = 123456315 M = 123456313 M = 123456311 M = 123456309 M = 123456307 M = 123456305 M = 123456303 M = 123456301 M = 123456299 M = 123456297 M = 123456295 M = 123456293 M = 123456291 M = 123456289 M = 123456287 M = 123456285 M = 123456283 M = 123456281 M = 123456279 M = 123456277 M = 123456275 M = 123456273 M = 123456271 M = 123456269 M = 123456267 M = 123456265 M = 123456263 M = 123456261 M = 123456259 M = 123456257 M = 123456255 M = 123456253 M = 123456251 M = 123456249 M = 123456247 M = 123456245 M = 123456243 M = 123456241 M = 123456239 M = 123456237 M = 123456235 M = 123456233 M = 123456231 M = 123456229 M = 123456227 M = 123456225 M = 123456223 M = 123456221 M = 123456219 M = 123456217 M = 123456215 M = 123456213 M = 123456211 y = 123456209 123456211

### Community Treasure Hunt

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

Start Hunting!