This package provides a function, sum_two_squares_one, for decomposing an integer into the sum of two squares. It also provides functions related to the same problem.
See is_sum_two_squares, r2, sum_two_squares_one, sum_two_squares_one_checked.