The famous [problem number 6 of the 1988 International Mathematical Olympiad](https://www.youtube.com/watch?v=Y30VF3cSIYQ) is about showing that if $a,b$ are non-negative integers such that $\frac{a^2+b^2}{ab+1}$ is an integer, then it is a square number.


Given $A\subseteq \mathbb{N}$, let $\mu^+(A) = \lim\sup\_{n\to\infty}\frac{|A\cap\{1,\ldots,n\}|}{n+1}$ be the upper density of $A$. 


Let $I$ be the set of positive integers $n$ such that there are positive integers $a,b$ with $n^2 = \frac{a^2+b^2}{ab+1}$. 


(I write *positive integers* $a,b$ above, because $n^2 = 
\frac{0^2 + n^2}{0\cdot n + 1}$.)


What is the value of $\mu^+(I)$?



Numbers representable as in the famous IMO question number 6 (1988)
From the solution for the problem (Vieta jumping), one can see that if there is one pair $(a,b)$ for which $\frac{a^2+b^2}{ab+1}=k$ then there are infinitely many. For instance, $(a,b)=(n^3, n)$ also works.


