10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.3 Squares and roots 107<br />

t = p − b 2 ;<br />

if(t ≡ 0(modd)) return {}; // Return empty.<br />

if(t/d not a square) return {}; // Return empty.<br />

return (±b, ± t/d); // Solution(s) found.<br />

This completely solves the computational Diophantine problem at hand. Note<br />

that an integer square-root finding routine (Algorithm 9.2.11) is invoked at<br />

two junctures. The second invocation—the determination as to whether t/d is<br />

a perfect square—can be done along the lines discussed in the text following<br />

the Algorithm 9.2.11 description. Incidentally, the proof that Algorithm 2.3.12<br />

works is, in words from [Cohen 2000], “a little painful.” There is an elegant<br />

argument, due to H. Lenstra, in [Schoof 1995], and a clear explanation from<br />

an algorist’s point of view (for d = 1) in [Bressoud and Wagon 2000, p. 283].<br />

The second case, namely for the Diophantine equation x 2 + |D|y 2 =4p,<br />

for D

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!