# Yet another property of quadratic fields with extra units

Here is an amusing exercise that is suitable for a course on basic algebraic number theory: let p be a prime number. Consider integral solutions (a,f) to

$4p=a^2+3f^2$

with a and f positive. The claim is that, if p is congruent to one mod 3, there are three distinct solutions (a,f), (b,g), (c,h), and if they are ordered

$1\leq a

then we have

$c=a+b$

For example, in the case p=541,  we find a=17, b=29, c=46:

$4p=2164=17^2+3\times 5^5=29^2+3^3\times 7^2=46^2+3\times 2^4$

The pedagogic value of the exercise is that while it looks like something that one could prove by a simple brute force computation, this is not so easy to do, while it becomes elementary knowing the basic facts about factorizations of primes in quadratic fields (and units of imaginary quadratic fields, in this case Q(√-3).

Indeed, the equation means that p is the norm of the integral ideal generated by

$\frac{a}{2}+ \frac{f\sqrt{-3}}{2}$

It is known that only primes congruent to 1 modulo 3 are norms in this field, hence the first condition on p. Then, it is known that the ideal above is unique up to conjugation. So the only possible extra solutions, given one of them, are obtained by multiplying by a unit of the field, and isolating the “coefficient of 1”, or in other words taking the trace to Q. Since the units are

$\pm 1,\, \pm j=\frac{\mp 1\pm \sqrt{-3}}{2},\, \pm j^2$

simply multiplying shows there are three positive solutions:

$a,\,\frac{a+3f}{2},\,\frac{|a-3f|}{2}$

Depending on the sign of a-3f, the conclusion follows by considering two cases.

[This minor property of quadratic fields was motivated by the question of finding interesting examples of relations between the zeros of zeta functions of algebraic curves over finite fields; for quite a bit more about this – both results of independence and examples of relations -, see my preprint on the subject, in particular Section 6 for the examples.]