IMC 2005 · Problem 6

Day 212th IMC · Blagoevgrad, Bulgaria

Statement

Prove that if pp and qq are rational numbers and r=p+q7r = p + q\sqrt{7}, then there exists a matrix (abcd)±(1001)\begin{pmatrix} a & b \\ c & d \end{pmatrix} \ne \pm \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} with integer entries and with adbc=1ad - bc = 1 such that

ar+bcr+d=r.\frac{ar+b}{cr+d} = r.

Official solution

Hidden so you can work on the problem first.