Two positive numbers and are said to be connected (denoted by "") if one of these conditions holds:
(1) and have the same length and differ in exactly one digit; for example, .
(2) Adding one digit to the left of (or ) makes (or ); for example, and .
We call a prime a 's relative if there exists a chain of connected primes between and and no prime in the chain exceeds .
For example, is a 's relative. One of the possible chains is shown below:
However, and are not 's relatives.
Let be the sum of the primes which are not 's relatives.
We can verify that and .
Find .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.