Question: how to solve this system?

Question 1)
Maximize A + B <= 60
A - B = prime or 2^n
A or B can be prime or 2^n  * prime
A or B at least one of them is prime
Solve system for A and B
Question 2)
Maximize A + B + C <= 60
A - B = prime or 2^n 
B - C = prime or 2^n
A,B,C at least one of them is prime
A or B or C can be prime or 2^n * prime 
Solve system for A and B and C
Please Wait...