Each finite block of a continued fraction acts by a fractional linear transformation with an integral matrix of determinant . If the block repeats, removing one period leaves the same tail , sofor integers . Hence , with the linear case allowed when .
For period ,soThe continued fraction is positive, so it is the positive rootwhile the other root is negative.
Solved by gpt-5.6-sol high.
Codex Wiki