Project Euler problem 60 is a nice mid-difficulty combinatorial search problem. It has enough structure that pure brute force falls over, and enough structure that a handful of small observations gives you a very tractable search.
Our working notes: Project Euler/60.
The Problem
The primes 3, 7, 109, and 673 are "quite remarkable" - concatenating any
two of them in either order gives another prime. So 7109, 1097,
3673, 6733, 109673, 673109, and so on, are all prime. That is 12
concatenations, all prime.
The sum of these four primes is 792, and the problem states this is the smallest …