5,817 followers
RT @CardColm: The Hermite-Serret Algorithm for writing n as a sum of two squares: given a square root z of -1 modulo n, apply Euclidean alg…
RT @CardColm: The Hermite-Serret Algorithm for writing n as a sum of two squares: given a square root z of -1 modulo n, apply Euclidean alg…
The Hermite-Serret Algorithm for writing n as a sum of two squares: given a square root z of -1 modulo n, apply Euclidean algorithm to n and z, stopping at the first pair x and y of remainders that are smaller than sqrt(n). Get n = x^2 + y^2 https://t.co/