### Proposition 3.4

Let F be a primitive form. We can write with a fundamental discriminant. Then if and only if either , or if

### Proof

An explicit computation show that is a square modulo 4. Hence, it can always be written as . Assume first . Then and so we can write

with integral.

Assume . A computation shows that

Since we have hence if , either , i.e , or , i.e .

Assume now that p=2. If , we have

Since , . Since the square of an integer is congruent to 0 or 1 modulo 4, it follows that

in other words , hence once again either or as before.

Conversely, assume that either or . If , then since F is primitive, by Proposition 3.3 (2), we have .

Assume first p>3. Then , hence , so .

Assume now that p=2. Then for some other quadratic form , hence , hence the same is true for and hence .

Finally, assume that p=3. From the explicit formulas, is equivalent to and , from which it follows by the formula for the discriminant that , and in particular .

Assume now that , and . We may assume that , otherwise we are in the case which we have just dealt with.

By the same reasoning as before, writing , we have

Hence is equivalent to which implies , hence if p>2 we have .

For p=2 and , we have as before

and since , we deduce that

and hence , thus finishing the proof of the proposition.