From: jr@redmink.demon.co.uk (John R Ramsden) Subject: Re: quadratic diophantine equation Date: Sun, 01 Aug 1999 18:05:55 GMT Newsgroups: sci.math Keywords: representation by quadratic forms On 30 Jul 1999 20:03:22 GMT, heye@netcologne.de (Thomas Heye) wrote: >I'm interested in the numbers generated by >$a^2 +-ab +b^2$, where a, b are integers. I transformed it to >a^2 -ab +b^2 =(a +b/2)^2 +3(a -b/2)^2 >or >a^2 +ab +b^2 =(a -b/2)^2 +3(a +b/2)^2 >This reminds me of an ellipse equation ... Maybe someone can help me >or give me some hints. > >Regards, > >Thomas If (a, b) = 1, i.e. a, b are relatively prime then a^2 +a.b + b^2 is a product of primes of the form 3.Z + 1. This can easily be seen by multiplying by four, completing the square, and noting that the square of an integer is never of the form 3.Z + 2. The converse also holds, i.e. any integer whose prime factors are all of the form 3.Z + 1 can be represented as a^2 + a.b + b^2 for integers a, b (in a number of ways that depends on the number of factors, prime or otherwise, of the number). For two integers p, q of the form a^2 + a.b + b^2, c^2 + c.d + d^2 their product is of the form e^2 + e.f + f^2 where e, f are defined as follows in which w^2 + w + 1 = 0: e - w.f = (a - w.b).(c - w.d) i.e. equating rational and irrational parts: e, f = a.c - b.d, a.d + b.c + b.d For example: 1^2 + 1.1 + 1^2 = 3 2^2 + 2.1 + 1^2 = 7 So using: (1 - w).(2 - w) = 2 - 3.w + w^2 = 2 - 3.w - (w + 1) = 1 - 4.w we find, sure enough: 1^2 + 1.4 + 4^2 = 21 = 3.7 The only way you can get even numbers of the form a^2 + a.b + b.^2, or numbers of that form divisible by primes of the form 3.Z + 2, is for a, b to have common factors (2 or the primes 3.Z + 2 resp). A good modern reference, with plenty of numerical examples is "Quadratic Forms", by Beuller [sp?], Springer-Verlag. Cheers --- John R Ramsden # "No one who has not shared a submarine # with a camel can claim to have plumbed (jr@redmink.demon.co.uk) # the depths of human misery." # # Ritter von Haske # "Adventures of a U-boat Commander". [duplicate sig deleted -- djr