If a prime $p$ can be written as the sum of two squares, then one can construct this representation via Fermat descent if we know an $x$ such that $x^2 \equiv −1 \mod p$. Is there a possibility to say how much steps the Fermat descent will have without just going through the descent?
I have also posted this question on MathStackExchange a week ago (here), but received no answer. I hope it is ok to post it here, too.
EDIT: For example, let $p=1553$. Then $x=339$ and $339^2 + 1^2 = 74 \cdot 1553$. With the descent, we next compute numbers $x_2$, $y_2$ with $x_2^2+y_2^2 = k \cdot 1553$ with $k < 74$. In this case, $x_2=-142$, $y_2=5$ and $x_2^2+y_2^2=13 \cdot 1553$. Going on, in the next step we get $(-9)^2 + (-55)^2 = 2 \cdot 1553$ and finally $(-32)^2 + 23^2 = 1 \cdot 1553$. So here we have three steps: $74 \mapsto 13, 13 \mapsto 2, 2 \mapsto 1$.