I recently implemented Hart's one-line factoring algorithm:
Given $n$ not a square and with no factors less than $n^{1/3}$ (determined by trial division), then for each $i$ increasing from $1,$ compute $s \leftarrow \lceil\sqrt{ni}\rceil$, $m \leftarrow s^2 \bmod n$, and if $m$ is a square, $\gcd(s-\sqrt{m},n)$ is a factor of $n$.
Most of the time in the algorithm is spent computing the square roots of $ni$. Is there a fast way to compute $\lceil\sqrt{ni}\rceil$ if $\lceil\sqrt{n(i-1)}\rceil$ is known?