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'))))
Do you consider (13, 31) and (31, 13) as the same or different pair primes? Similarly, how about (79, 97) and (97, 79)?
Thanks for pointing it out. They are different pair primes.
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.
can you do better than this?
Clean the List of Names
Renaming a field in a structure array
Project Euler: Problem 8, Find largest product in a large string of numbers
Make a run-length companion vector
Is the input divisible by 3?
Write out numbers in words
Check if the input is an interprime
Calculate F statistics ( One-way Analysis of Variance)
Delete the rows in the middle
Create initial basic feasible solution for transportation problems - North-West Corner Method
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office