# powers of $\frac{1+\sqrt a}2$

For any a which is not a perfect square, let $x=\frac{1+\sqrt a}2$.

$x^n$ can be written uniquely as $b_nx+c_n$, where b and c are rational.

Apart from $a=0, a=1, a= 1 \pm 2^m$ for $m>2$, are there any other values of $a$ for which $b$ or $c$ is an integer for infinitely many $n$? If not, are there any upper bounds on the values of n for which $b$ or $c$ is an integer?

e.g for $a=7$

$\\b \ c\\ 0 \ 1\\ 1 \ 0\\ 1 \ \frac{3}2\\ \frac{5}2 \ \frac{3}2\\ 4 \ \frac{15}2\\ \frac{23}2 \ 6\\ \frac{35}2 \ \frac{69}4$

$b_n=b_{n-1}+c_{n-1}$ and $c_n=\frac{a-1}4b_{n-1}$

-
Or did you mean to exclude all $a$ that are $1$ ($\bmod 4$)? –  WimC Mar 14 '12 at 9:36
In fact, if $m > 2$ then none of the choices $a = 2^m+1$ satisfies this criterion: All $b_n$ will be odd. –  WimC Mar 14 '12 at 12:24

If $a \equiv 5$ ($\bmod 8$) then this happens infinitely many times. This follows from the relation $x^2 = x + \tfrac{a-1}{4}$ and $\tfrac{a-1}{4}$ is odd. Suppose $x^n = b_nx + c_n$ for integers $b_n,c_n$ then
$$x^{n+1} = (b_n+c_n)x + b_n\frac{a-1}{4}$$
So $b_n \equiv 1, 1, 0, 1, 1, 0, \dotsc$ ($\bmod 2$).