Integer as sum of two squares of integers
Posted: Sat Feb 12, 2005 12:06 pm
How to check if given integer n can be represented as sum of two squares of integers??
I know that:
a)Those numbers n whose prime divisors of the form 4*m+3 divide n an even number of times can be written as the sum of two squares.
b)Jacobi's Two Square Theorem: The number of representations of a positive integer as the sum of two squares is equal to four times the difference of the numbers of divisors congruent to 1 and 3 modulo 4.
But when n is big (10^10 or 10^12) it's hard to check all divisors or find all prime divisors of the form 4*m+3.
Can anyone give me a hint how to efficently check whether n can be represented as the sum of two squares or not??
I know that:
a)Those numbers n whose prime divisors of the form 4*m+3 divide n an even number of times can be written as the sum of two squares.
b)Jacobi's Two Square Theorem: The number of representations of a positive integer as the sum of two squares is equal to four times the difference of the numbers of divisors congruent to 1 and 3 modulo 4.
But when n is big (10^10 or 10^12) it's hard to check all divisors or find all prime divisors of the form 4*m+3.
Can anyone give me a hint how to efficently check whether n can be represented as the sum of two squares or not??