Involutions associated with sums of two squares

P. Shiu

Abstract: In 1984 D.R. Heath-Brown constructed two involutions from which a new and simple proof of Fermat's theorem on the decomposition of a prime $$p\equiv 1\pmod 4$ as a sum of two squares was derived. An algorithm based on the composition of the two involutions is constructed for the decomposition of $p$, and the method can also be used for the factorisations of suitable composite numbers. The process corresponds to the continued fraction expansion of a reduced quadratic irrational related to $\sqrt p$, and the period of the composite map is the sum of the relevant partial quotients.