Since I know if $ d $ is an integer that $ sqrt {d} =[alpha_0,bar{alpha_1},…bar{alpha_n},bar{2alpha_0}]$. I want to show that $ sqrt {d} $ has a length of period 1 if and only if $ d = a ^ 2 + 1 $, for a natural number a.

This is what I think I should do. Could someone confirm it to me?

($ Leftarrow $) Assumed $ d = a ^ 2 + 1 $then $ sqrt {d} = sqrt {a ^ 2 + 1} $.

$ (a-1) ^ 2 leq a ^ 2 + 1, Rightarrow (a-1) leq sqrt {a ^ 2 + 1} $

So the soil of $ sqrt {a ^ 2 + 1} $ is $ a-1 = alpha_0 $.

By subtracting this and inverting, we obtain:

$ tfrac {1} { sqrt {a ^ 2 + 1} – (a-1)} = tfrac { sqrt {a ^ 2 + 1} + (a-1)} {2a} $, which has floor 1.

So we know $ alpha_1 = $ 1, subtracting this and inverting, we obtain:

$ tfrac {2a} { sqrt {a ^ 2 + 1} – (a-1)} = tfac {2a ( sqrt {a ^ 2 + 1} + (a-1)} {2a} = sqrt {a ^ 2 + 1} + (a-1) $who has the floor $ 2a-2 $, subtracting and inverting gives,

$ tfrac {1} { sqrt {a ^ 2 + 1} – (a-1) $So, we are back at the beginning and the continuous fraction has a period length of 1.

$ ( Rightarrow) $ assume $ sqrt {d} $ for the length of period 1. Then $ sqrt {d} =[alpha_0,bar{alpha_1}]=[alpha_0,bar{alpha_1},bar{2alpha_0}]$.

So we can write:

$ sqrt {d} = alpha_0 + tfrac {1} { alpha_1 + tfrac {1} {2 alpha_0 + tfrac {1} {…}}} = alpha_0 + tfrac {1} { alpha_1 + tfrac {1} {2 sqrt {d}}} $.

I have not yet managed to solve this problem, but $ d = a ^ 2 + 1 $, do you come down to rearrange what I just wrote?