find integers a and b such $x^2-x-1$ divides $ax^{17}+bx^{16}+1 = 0$
By really long division i got :-
$$Q=ax^{15} + (a+b)x^{14} + \dots +(610a + 377b) $$ $$R = x(987a+610b)+1+610a+377b$$
since remainder is $0 $, $$987a+610b = 0$$ $$1+610a+377b = 0$$
from which i got $a = -610, b = 987$
but from wolfram alpha the remainder of $-610x^{17}+987x^{16}+1 \over x^2-x-1$ is $x-1$
Somebody please show me where i went wrong ?
Thanks.
The polynomial $x^2-x-1$ divides $ax^{17}+bx^{16}+1$ if and only if $$a\phi_+^{17}+b\phi_+^{16}=-1\quad\mbox{and}\quad a\phi_-^{17}+b\phi_-^{16}=-1,$$ where $\phi_{\pm}$ are the solutions of $x^2-x-1=0$. Then, after adding, and subtracting the two equations we find $$aL_{17}+bL_{16}=-2\quad\mbox{and}\quad aF_{17}+bF_{16}=0$$ where $F_n$ and $L_n$ are the Fibonacci and Lucas numbers, that is $$3571a+2207b = -2\quad\mbox{and}\quad 1597a+987b = 0.$$ Finally by solving the linear system we get $a=987$ and $b=-1597$.