Here is a simple EIGHT-SANDWICH. There are 150 different 8-sandwiches, plus their mirror images.
1 5 1 8 4 7 6 5 2 4 3 2 8 7 3Extending this problem to sandwiches where each digit occurs three times, rather than twice is a Tough Nut. There are solutions for the 24-digit sandwiches containing three each of the digits 1 to 8. Can you find any solutions or write a program to find them?
For some values of n there are triple-n-sandwiches and for other values of n there are none. For which values of n do triple-n-sandwiches exist and for which values do they not exist and why?
This problem first appeared on NRICH in September 1997 and the solution there gives a program for printing out all the solutions for a given n-sandwich with two of each digit.