# solving-set-of-gcd-equations (continued discussion)

With reference to this question, I am trying to generalize my previous question here.

If I have two GCD equations with common variable $$m$$ as follow: $$GCD(m,p_i)=1$$ and $$GCD(m+7,p_i)=1$$ where $$p_i$$ takes values from the first 20 prime numbers. can the two GCD equations be combined (since they both share second argument $$p_i$$)?

My target is to get all potential values of $$m$$ (in a given range, say from 1 to 1000). I thought if we can combine the two GCD equations into one GCD equation (for each $$p_i$$) then we have probably good base to calculate all values of m.

• $\gcd(m,p_i)=1$ and $\gcd(m+7,p_i)=1$ combine to give $\gcd(m(m+7),p_i)=1$. – Gerry Myerson Aug 18 '17 at 0:22
• @GerryMyerson, OH yes, this is allowed! thanks a lot.! – bijan karimi Aug 18 '17 at 0:50