Sum of two squares - Number of steps in Fermat descent

349 Views Asked by At

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?