Problem 44343. Pair Primes
40.31% Correct | 59.69% Incorrect
Last Solution submitted on Mar 20, 2023
Show 1 older comment
Alfonso Nieto-Castanon on 20 Oct 2017
there are quite a few look-up table solutions, could you perhaps add something like the following to the test suite to discourage these? assert(~any(cellfun(@(x)ismember(max([0,str2num(x)]),[51,2485,136162,8578934]),regexp(fileread('pairPrimes.m'),'[\d\.\+\-\*\/]+','match'))))
Peng Liu on 24 Oct 2017
Do you consider (13, 31) and (31, 13) as the same or different pair primes? Similarly, how about (79, 97) and (97, 79)?
Mehmet OZC on 24 Oct 2017
Thanks for pointing it out. They are different pair primes.
Rafael S.T. Vieira on 9 Jul 2020
Good problem. At first, I thought we needed to reverse the numbers, but only their order is necessary. And we need to count twice numbers like 31 and 13.
Solution CommentsShow comments
Problem Recent Solvers98
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!