Hello,

What comes in my mind is that we have to solve for p and q before finding p+q... maybe there is another method...

This comes with the Euclidian algorithm, which will yield to Bézout's theorem (google for them).

43 & 23 are coprime, that is to say they have no common divider.

The theorem states that if 43 and 23 are coprime, then we can write it :

, where u & v are integers (positive or negative).

-------------------------

Now, the thing is that you have to find aparticularsolution to the equation , thanks to the Euclidian algorithm.

Thus

--------------------------

What's good with it is that we can multiply the equation by 4323 in order to get a particular solution for p and q in

-->

---------------------------

MOO

So we have :

Because 43 and 23 are coprime, we know by the Gauss theorem, that and ,

Therefore thegeneralsolution is :

Remember, and

------------------------------

and are ugly because 4323 is a large number, and I showed a general method.

If you have got a particular solution (100 and 1), set up and and take it from the red MOO.

I hope this is clear enough... If you have any question...