Let be a prime and be two integers with the following properties:
and have no prime factor in common, that is .
The product is divisible by every prime less than q.
It can be shown that, given these conditions, any sum and any difference has to be a prime number. Thus you can verify that a number is prime by showing that either or for some fulfilling the conditions listed above.
Let be the smallest possible value of in any sum and any difference , that verifies being prime. Examples: , since . , since is the associated sum with the smallest possible . since is the associated difference with the smallest possible .
Let be the sum of for all primes . For example, and .
Find .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.