View Single Post
Old 2009-08-25, 12:08   #3
Gammatester
 
Gammatester's Avatar
 
Mar 2009

2×19 Posts
Default

Quote:
Originally Posted by SPWorley View Post
How about the case where p=a^2 +2* b^2, which comes up when dealing with quartic reciprocity?
Cornacchia's algorithm can be used in this case too, generally you can solve a^2 + d*b^2 = p, with 0<d<p. There is a modified algorithm for a^2 + |d|*b^2 = 4p. Crandall/Pomerance: Prime Numbers (Algorithm 2.3.12 +) is another reference.
Gammatester is offline   Reply With Quote