Quote:
Originally Posted by ATH
Thanks, it was just something like this I was looking for:
(2kp+1)=0 (mod q) => 2kp+1= c*q => c*q  2kp = 1
Then I can find c and more importantly 2*k my using the algorithm on GCD(p,q). Allready tested it and it works great.

If you did GCD(2p,q) you'd get k. Is this any improvement?
I see Davar55 has revived that embarrassing thread I cited in
the Math forum!