View Single Post
 Sci Advisor HW Helper P: 1,996 I figured out what to do when k is even. I knew it involved doubling the period or something similar, but it wasn't working out. Sorry for the confusion. Anyhoo, ionce you get to $$\sqrt{D}=[a_{0}, a_{1}, \ldots, a_{k}, a_{0}+\sqrt{D}]$$ and k is even, you need to find x, y with $$x/y=[a_{0}, a_{1}, \ldots, a_{k}, 2a_{0}, a_{1}, \ldots, a_{k}]$$, then x, y are your minimal solutions. The $$2a_{0}$$ term shouldn't be suprising. If you were at $$\sqrt{D}=[a_{0}, a_{1}, \ldots, a_{k}, a_{0}+\sqrt{D}]$$, and you wanted to find more terms, you'd see $$a_{k+1}=2a_{0}$$. Muck about with a few examples and you'll see why this is so.