Project Euler 278 - Linear Combinations of Semiprimes

Official link:

Thought Process

This was a really fun problem for me.

First my research led me to the Frobenius Number, which is exactly what we are looking for!

Implementing a full scale algorithm turned out to be quite hard, I finally managed to do it long after the problem and it will be added to my math library

But in order to solve the problem we can make use of a very neat trick, which you may find here:

Brute force looping does the trick from here!

Interactive Code

Input an integer (yourinput)

Code outputs sum f(pq, pr, qr) for p < q < r < yourinput where p, q, r are primes