You literally said a_3 = 9, and 1771 is 3 mod 4, so the answer should be 9, not 10.
You are correct, thanks! Fixed.