Let's define pair primes as follow;
1-) 1637 and 7549 are pair primes. First ends with 7 and second starts with 7.
2-) 6221 and 2113 are pair primes. First ends with 21 and second starts with 21.
3-) 1429 and 4297 are pair primes. First ends with 429 and second starts with 429. You should be careful. 2111 and 1117 are also four digit pair primes. It satisfies three conditions. First ends with 1 and second starts with 1. First ends with 11 and second starts with 11. First ends with 111 and second starts with 111. [2111 1117] pair should be counted for once.
Given the digit counts, can you determine how many unique pair primes are there (a~=b)
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.
can you do better than this?
219 Solvers
Getting the indices from a matrice
337 Solvers
Magic is simple (for beginners)
1847 Solvers
Integer Sequence - II : New Fibonacci
204 Solvers
272 Solvers