# If $0\leq \cdots \lt s'''\lt s''\lt s'\lt s$ and $s''=((s')^2-k)/s$, $s'''=((s'')^2-k)/s',\ldots$, then $k$ is a perfect square

This is an IMO problem from 1988, problem 6. The book does not provide a proof of this part and it is eluding me.

Let $$\cdots \lt s''' \lt s'' \lt s' \lt s$$ all be nonnegative integers (a finite sequence), and let $k$ be a nonnegative integer such that \begin{align*} 0 &\leq s''\\ s'' &=\frac{(s')^2 - k}{s}\\ s'''&=\frac{(s'')^2 - k}{s'}\\ &\vdots \end{align*}

and $s''^2+s'^2$=k(s''s'+1) ,$s+s''=-s'k,ss''=s'^2-k$ Prove that $k$ is a perfect square.

-
Please make your titles informative as to the problem itself; that makes them useful for other users of this site, and easier to search for. Telling us about your mental state is simply not very useful in the title. – Arturo Magidin Oct 31 '11 at 1:59
Your title is not informative. Frankly, how you feel about the problem is of little interest to anyone except yourself, and the tags don't help elucidate what is in the body; [algebra] and [contest-math] are too general to really be useful in searching. So, please, make your titles informative! – Arturo Magidin Oct 31 '11 at 2:05
@ArturoMagidin - Thanks, i don't know if it is appropriate to put the whole question on the title. – Victor Oct 31 '11 at 2:07
According to artofproblemsolving.com/Wiki/index.php/1988_IMO_Problems/… IMO 1988 6 is a problem about $ab+1$ dividing $a^2+b^2$. I can see where maybe one way to solve it would lead to your question. The solution at the link doesn't go that way. IMO 1988 6 is so nice it keeps coming up and you can probably find many solutions around the web. – Gerry Myerson Oct 31 '11 at 3:38
– Gerry Myerson Oct 31 '11 at 3:51