Given two numbers, $a_0 = 172, a_1 = 61$
Write the the extended Euclidean algorithm and Bezout’s coefficients $x_k$ and $y_k$, i.e. the numbers such that the following equation is satisfied: $x_k a_0 + y_k a_1 = \gcd(a_0, a_1)$
I wrote out all the steps but there is something wrong with my x coefficient and can't figure out where I went wrong: $$ \begin{array}{c|cc} {} & x & y\\ \hline a_0=172 & x_0= 1 & y_0=0\\ a_1=61 & x_1= 0 & y1=1\\ 172=2(61)+50 & 1-2(0) & 0-2(1)\\ a_2=50 & x_2=1 & y_2=-2\\ 61=1(50)+11 & 0-1(1) & 1-1(2)\\ a_3=11 & x_3=-1 & y_3=3\\ 50=4(11)+6 & 1-4(1) & -2-4(3)\\ a_4=6 & x_4=5 & y_4=-14\\ 11=1(6)+5 & -1-1(5) & 3-1(-14)\\ a_5=5 & x_5=-6 & y_5=17\\ 6=1(5)+1 & 5-1(-6) & -14-1(17)\\ a_6=1 & x_6=11 & y_6=-31 \end{array} $$ Thus $1=9(172)+(-31)(61)$.