Sum of two squares theorem - Wikipedia
https://en.wikipedia.org/wiki/Sum_of_two_squares_theoremIn number theory, the sum of two squares theorem relates the prime decomposition of any integer n > 1 to whether it can be written as a sum of two squares, such that n = a + b for some integers a, b. An integer greater than one can be written as a sum of two squares if and only if its prime decomposition contains no factor p , where prime and k is odd. In writing a number as a sum of two squares, it is allowed for one of the squares to be z…