Characterization of positive integers which are the sum of squares in exactly one way.
- 1d. Re: Formula
Posted by: "marku606" mark.underwood@... marku606
Date: Sat Oct 3, 2009 9:48 am ((PDT))
--- In firstname.lastname@example.org, "maximilian_hasler" <maximilian.hasler@...> wrote:
>>> > > > *only* primes and powers of primes can be
>>> > > > expressed as the sum of two squares in only one way.
>> > >
>> > > 45 = 32 + 62 is not a prime or a power of a prime
> > nor is 10=12+32.
> > See
> > http://www.research.att.com/~njas/sequences/A025284
> > Numbers that are the sum of 2 nonzero squares in exactly 1 way.
An integer z is a sum of two squares in exactly one way if and only if
one of the following forms:
(1) an odd power of 2, z = 2**(2 * m + 1) for m > 0
(2) a prime equal to 1 mod 4
(3) the square of a prime equal to 1 mod 4.
z = p * h**2 where p is either 2, or an odd prime equal to 1 mod 4,
or the square of an odd prime equal to 1 mod 4,
and h has all prime factors equal to 3 mod 4.
The proof follows immediately from the formula
(a1 **2 + b1**2) * (a2**2 + b2**2) = (a1 a2 - b1 b2)**2 + (a1 b2 + a2
b1)**2 = (a1 a2 + b1 b2)**2 + (a1 b2 - a2 b1)**2
and the theorem that a prime equal to 1 mod 4 is the sum of two squares
in exactly one way.