Problem 44675. Find prime number couples

Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which each row contains one pair of prime couples. A prime number couple pair are two prime numbers with a difference of two between them. Keep in mind that the numbers 2, 3, 5, and 7 are prime numbers.

For example, if a=[1 2 3 6 11 13 101 103], the output should be couple=[11 13; 101 103].

Solution Stats

50.0% Correct | 50.0% Incorrect
Last Solution submitted on Oct 10, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers23

Suggested Problems

Community Treasure Hunt

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

Start Hunting!