The following are all of the 2-digit primes: Concatenating 17 and 79 in such a way that the common digit 7 collapses on each other, we can make 179.
In the same fashion, we can construct 613, where 61 and 13 were used with 1 appearing only once.
A much bigger example would be 4731979, where six 2-digit primes 47, 73, 31, 19, 97, 79 were used in that order.
What is the largest number that can be constructed this way, using each 2-digit prime at most once?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Of the twenty-one 2-digit primes, nine begin with an even number and two with a 5. No prime is even or ends with a 5, so if any of those 11 numbers is used it must be the first component of the answer and none of the others can be used.
The first component must be one of 89, 83, 67 or 61, since these are the largest ones ending with each of the 4 possible odd primes that the remainder of the answer must start with.
The remaining ten 2-digit prime numbers, containing only the digits 1, 3, 7 and 9, can be used to make a number with at most 11 digits. Do any such exist? In any sequence made from overlapping 2-digit numbers, the first and last digits are used once and all others twice. If the first and last digits are the same, then all digits are used an even number of times; if the first and last digits are different, then two digits are used an odd number of times and the other two an even number of times. Conversely, if a digit is used an odd number of times, one appearance must be as either the first or last digit.
The digits 1, 3, 7 and 9 occur 7, 4, 6 and 3 times respectively in the 10 available odd-odd primes. Therefore if an 11-digit answer exists, it must start with a 1 and end with a 9, or vice-versa. But the first digit cannot be 9 since that could only come from 97 and would leave no way of using 19 and 79. Therefore the only possible 11-digit solutions must start with 1 and end with 9.
Try to construct the largest possible such number. The second digit can be 9; the third digit must then be 7, the penultimate digit also has to be 7. The largest remaining possibility for the fourth digit is 3, and then for the fifth digit, 7. The third from the end must then be 1 and the sixth is also a 1. The seventh digit must then be 3 and the last space filled with a 1. This is a legal solution, since it uses all 10 odd-odd primes once and once only, and by its construction it must be the largest such number. [There are in fact other, smaller, solutions]
This 11-digit number can be preceded by the largest even-odd or 5-odd prime with a 1 as second digit. This number is 61. Thus the final answer is the 12-digit number 619737131179.