Let $a,b$ be two positive integers. Let the sequence $\{s\_n\}\_n$ be the set of all possible sums of squares $a^2+b^2$, such that they are in *ascending order*
\begin{align\*}
& n=1 & s\_1=1^2+1^2=2 \\
& n=2 & s\_2=1^2+2^2=5 \\
& n=3 & s\_3=2^2+1^2=5 \\
& n=4 & s\_4=2^2+2^2=8
\end{align\*}
etc. Here $n$ serves as a counting index for the sequence and does not serve any other purpose. I have found that the number of identical values that each sum can have is equal to the [number of lattice points lying on a quarter of circumference of a circle of radius $n$](https://math.stackexchange.com/questions/2512236/number-of-lattice-points-on-a-circle). For example, $s\_2=s\_3=5$ we have two values, but there are other cases, such as
\begin{align\*}
& n=31 & s\_{31}=1^2+7^2=50 \\
& n=32 & s\_{32}=5^2+5^2=50 \\
& n=33 & s\_{33}=7^2+1^2=50 
\end{align\*}


To the best of my knowledge, there are no references to the asymptotic form of $\{s\_n\}\_n$ as $n\to \infty$, if indeed it exists. A brute-force approach with $n\le10^6$ led to the expression
$$
\{s\_n\}\_n\sim \beta n,\qquad\beta\approx1.276\ldots.
$$
Therefore my question is: is there any known closed form of the asymptotics of this particular succession? A more profound and interesting question is, why does it seem to be linear?



Asymptotic analysis of a peculiar sum of squares sequence
The answer has been provided by [Noam D. Elkies](https://mathoverflow.net/users/14830/noam-d-elkies), for which I'll copy here his comment.


Usually this is studied in the nearly equivalent form of asking for the number of $(x,y)$ such that $x^2+y^2\le N$.


The answer is asymptotic to the area of this circle, which is $\pi N$. Since you're using a quarter-circle, we replace the factor $\pi$ by $\pi/4$.


Then the $n$-th sum of squares should be asymptotic to
$$
\frac{4}{\pi}n
$$


Indeed your $\beta$ nearly equals $4/\pi=1.273\ldots$


