Content uploaded by Eugen Ionascu

Author content

All content in this area was uploaded by Eugen Ionascu

Content may be subject to copyright.

PRIMES OF THE FORM ±a2±qb2

EUGEN J. IONASCU AND JEFF PATTERSON

Abstract. Representations of primes by simple quadratic forms, such as ±a2±

qb2, is a subject that goes back to Fermat, Lagrange, Legendre, Euler, Gauss and

many others. We are interested in a comprehensive list of such results, for q≤20.

Some of the results can be established with elementary methods and we put them

at work on some instances. We are introducing new relationships between various

representations.

1. INTRODUCTION

Let us consider the following three types representations of natural number:

(1) E(q) := {n∈N|n=a2+qb2,with a, b ∈Z},

(2) H1(q) := {n∈N|n=qb2−a2,with a, b ∈Z},and

(3) H2(q) := {n∈N|n=a2−qb2,with a, b ∈Z}.

We are going to denote by Pthe set of prime numbers. In this paper we are

going to exemplify how standard elementary methods can be used to obtain the

representations stated in the next three theorems:

THEOREM 1.1. For a prime pwe have p∈ E(q)if and only if

(I)(Fermat) (q= 1)p= 2 or p≡1(mod 4)

(II)(Fermat) (q= 2)p= 2 or p≡1or p≡3(mod 8)

(III)(Fermat-Euler) (q= 3)p= 3 or p≡1(mod 6)

(IV)(q= 4)p≡1(mod 4)

(V)(Lagrange) (q= 5)p= 5 or p≡j2(mod 20) for some j∈ {1,3}

(VI)(q= 6)p≡1or 7(mod 24)

(VII)(q= 7)p= 7 or p≡j2(mod 14) for some j∈ {1,3,5}

Date: April 7th, 2013.

Key words and phrases. Quadratic Reciprocity, Pigeonhole principle,

1

2 EUGEN J. IONASCU AND JEFF PATTERSON

(VIII)(q= 8)p≡1(mod 8)

(IX)(q= 9)p≡j2(mod 36) for some j∈ {1,5,7}

(X)(q= 10)p≡j(mod 40) for some j∈ {1,9,11,19}

(XI)(q= 12)p≡j(mod 48) for some j∈ {1,13,25,37}

(XII)(q= 13)p≡j2(mod 52) for some j∈ {1,3,5,7,9,11}

(XIII)(q= 15)p≡j(mod 60) for some j∈ {1,19,31,49}

(XIV)(q= 16)p≡1(mod 8)

We are going to prove (VII), in order introduce the method that it will be employed

several times. One may wonder what is the corresponding characterization for q= 11

or q= 14. It turns out that an answer cannot be formulated only in terms of residue

classes as shown in ([19]). We give in Theorem 1.4 possible characterizations whose

proofs are based on non-elementary techniques which are described in [6].

THEOREM 1.2. For a prime pwe have p∈ H1(q)if and only if

(I)(q= 1)p̸= 2

(II)(q= 2)p= 2 or p≡ ±1(mod 8) (i.e. p≡1or p≡1(mod 8))

(III)(q= 3)p∈ {2,3}or p≡11 (mod 12)

(IV)(q= 4)p≡3(mod 4)

(V)(q= 5)p= 5 or p≡ ±j2(mod 20) for some j∈ {1,3}

(VI)(q= 6)p= 2 or p≡j(mod 24) for some j∈ {5,23}

(VII)(q= 7)p= 7 or p≡j(mod 14) for some j∈ {3,5,13}

(VIII)(q= 8)p= 7 or p≡ −j2(mod 32) for some j∈ {1,3,5,7}

(IX)(q= 9)p≡ −1(mod 6)

(X)(q= 10)p≡j(mod 40) for some j∈ {1,9,31,39}

(XI)(q= 11)p∈ {2,11}or p≡ −j2(mod 44) for some j∈ {1,3,5,7,9}

In this case, for exempliﬁcation, we show (V).

THEOREM 1.3. For a prime pwe have p∈ H2(q)if and only if

(I)(q= 1)p̸= 2

(II)(q= 2)p= 2 or p≡ ±1(mod 8)

(III)(q= 3)p≡1(mod 12)

(IV)(q= 4)p≡1(mod 4)

(V)(q= 5)p= 5 or p≡ ±j2(mod 20) for some j∈ {1,3}

(VI)(q= 6)p= 3 or p≡j(mod 24) for some j∈ {1,19}

(VII)(q= 7)p= 2 or p≡j(mod 14) for some j∈ {1,9,11}

PRIMES OF THE FORM ±a2±qb23

(VIII)(q= 8)p= 7 or p≡j2(mod 32) for some j∈ {1,3,5,7}

(IX)(q= 9)p≡1(mod 6)

(X)(q= 10)p≡j(mod 40) for some j∈ {1,9,31,39}

(XI)(q= 11)p≡j2(mod 44) for some j∈ {1,3,5,7,9}

We observe that for q= 2, q= 5, q= 10 the same primes appear for both

characterizations in Theorem 1.2 and Theorem 1.3. There are several questions

that can be raised in relation to this observation:

Problem 1: Determine all values of q, for which we have

(4) H1(q)∩ P =H2(q)∩ P.

Problem 2: If the equality (4) holds true for relatively prime numbers q1and q2,

does is it hold true for q1q2?

In [6], David Cox begins his classical book on the study of (1), with a detailed and

well documented historical introduction of the main ideas used and the diﬃculties

encountered in the search of new representations along time. The following abstract

characterization in [6] brings more light into this subject:

(Theorem 12.23 in [6])Given a positive integer q, there exists an

irreducible polynomial with integer coeﬃcients fqof degree h(−4q),

such that for every odd prime pnot dividing q,

p=a2+qb2⇔the equations

x2≡ −q(mod p)

fq(x)≡0 (mod p)

have integer solutions. An algorithm for computing fqexists. (h(D)

is the number of classes of primitive positive deﬁnite quadratic forms

of discriminant D).

While some of the representations included here are classical and other may be more

or less known. We found some of the polynomials included here by computational

experimentations. For more details in this direction

THEOREM 1.4. For an odd prime pwe have p=a2+qb2for some integers a,

bif and only if

(I)(q= 11)p > 2and the equation

(X3+ 2X)2+ 44 ≡0 (mod p)has a solution,

4 EUGEN J. IONASCU AND JEFF PATTERSON

(II)(Euler’s conjecture) (q= 14) the equations

X2+ 14 ≡0and (X2+ 1)2−8≡0 (mod p)have solutions

(III) (q= 17) the equations X2+ 17 ≡0and (X2−1)2+ 16 ≡0(mod p) have

solutions

(IV)(q= 18) the equation (X2−3)2+ 18(22)≡0(mod p) has a solution

(V)(q= 19) the equation (X3−4x)2+ 19(42)≡0(mod p) has a solution

(VI)(q= 20) the equation (X4−4)2+ 20X4≡0(mod p) has a solution

(XXI)(q= 21) the equation (X4+ 4)2+ 84X4≡0(mod p) has a solution

(XXII)(q= 22)p > 22 and the equation (x2+ 3)2+ 22(42)≡0(mod p) has a

solution

(XXIII)(q= 23) the equation (X3+ 15X)2+ 23(192)≡0(mod p) has a solution

(XXIV )(q= 24) the equation (X4+ 4)2+ 24(2X)4≡0(mod p) has a solution

(XXV )(q= 25)p > 25 the equation X4+ 100 ≡0(mod p) has a solution

(XXVI )(q= 26)

(XXVII)(Gauss) (q= 27)p≡1(mod 3) and the equation X3≡2(mod p) has a

solution;

(XXVIII)(q= 28)

(XXVIV)(q= 29)p≡1(mod 4) and the equation (X3−X)2+ 116 = 0 (mod p)

has a solution;

(XXX)(q= 30)

(XXXI)(q= 31) (L. Kronecker, pp. 88 [6]) the equation

(X3−10X)2+ 31(X2−1)2≡0 (mod p)has a solution

(XXXII)(q= 32)p≡1(mod 8) and the equation

(X2−1)2≡ −1 (mod p)has a solution.

(XXXVII)(q= 37) the equation X4+ 31X2+ 9 = 0 (mod p) has a solution

(LXIV)(Euler’s conjecture) (q= 64)p≡1(mod 4) and the equation X4≡2(mod

p) has a solution.

Our interest in this subject came from studding the problem of ﬁnding all equi-

lateral triangles, in the three dimensional space, having integer coordinates for their

vertices (see [3], [8], [10], and [13]). It turns out that such equilateral triangles exist

only in planes Pa,b,c,f := {(x, y, z)∈R3:ax +by +cz =f, f ∈Z}where a,b, and c

are in such way

PRIMES OF THE FORM ±a2±qb25

Figure 1. “God created the integers, all else is the work of man.”

Leopold Kronecker

(5) a2+b2+c2= 3d2

for some integer dand side-lengths of the triangles are of the form

ℓ=d2(m2−mn +n2)

for some integers mand n. This leads to investigations of primes of the ﬁrst three

forms in the Let us include here a curious fact that we ran into at that time ([8]).

PROPOSITION 1.5. An integer twhich can be written as t= 3x2−y2with x, y ∈Z

is the sum of two squares if and only if tis of the form t= 2(m2−mn +n2)for

some integers mand n.

If we introduce the sets A:= {t∈Z|t= 3x2−y2, x, y ∈Z},B:= {t∈Z|t=

x2+y2, x, y ∈Z}and C:= {t∈Z|t= 2(x2−xy +y2), x, y ∈Z}then we actually

have an interesting relationship between these sets.

THEOREM 1.6. For the sets deﬁned above, one has the inclusions

(6) A∩B$C, B ∩C&A, and C∩A&B.

We include a proof of this theorem in the Section 4. The inclusions in (6) are strict

as one can see from Figure 1.

Let us observe that there are primes pwith the property that 2pis in all three

sets A,Band C. We will show that these primes are the primes of the form 12k+ 1

for some integer k. Some representations for such primes are included next:

(7)

13 = (12+ 52)/2 = 32−3(4) + 42= [3(32)−1]/2

37 = (52+ 72)/2 = 32−3(7) + 72= [3(5)2−1]/2

61 = (12+ 112)/2 = 42−4(9) + 92= [3(92)−112]/2.

6 EUGEN J. IONASCU AND JEFF PATTERSON

It is natural to ask whether or not the next forms in the Theorem 1.1 aren’t

related to similar parameterizations for regular or semi-regular simplices in Znfor

bigger values of n. In [20], Isaac Schoenberg gives a characterization of those n’s for

which a regular simplex exists in Zn. Let us give the restatement of Schoenberg’s

result which appeared in [16]: all nsuch that n+ 1 is a sum of 1, 2, 4 or 8 odd

squares.

We summarize next the explicit forms of Theorem 12.23 in [6] for q≤100.

As interesting corollaries of these statements we see that if one prime phas some

representation it must have some other type of representation(s). Let us introduce

a notation for these classes of primes:

Pq:= {podd prime|p=a2+qb2for some a, b ∈N}.

So we have P1=P4,P8=P16 (Gauss, see [21]), P5⊂ P1,P10 ⊂ P2, ..... In the

same spirit, we must bring to reader’s attention, that in the case q= 32 there exists

a characterization due to Barrucand and Cohn [1], which can be written with our

notation as

P32 ={p|p≡1 (mod 8),there exists xsuch that x8≡ −4 (mod p)}.

We observe that (xx) implies this characterization because x8+ 4 = (x4−2x2+

2)(x4+ 2x2+ 2) and clearly (x2−1)2+ 1 = x4−2x2+2. In fact, the two statements

are equivalent. Indeed, if ais a solution of x8+ 4 ≡0 (mod p) then we either have

x4−2x2+ 2 ≡0 (mod p ) or x4+ 2x2+ 2 ≡0 (mod p). We know that there

exists a solution bof x2+ 1 ≡0 (mod p). Hence if a4+ 2a2+ 2 ≡0 (mod p) then

(ab)4−2(ab)2+ 2 ≡0 (mod p) which shows that the equation x4−2x2+ 2 ≡0 (mod

p ) always has a solution.

Also, another classical result along these lines is Kaplansky’s Theorem ([14]):

THEOREM 1.7. A prime of the form 16n+ 9 is in P32 \P64 or in P64 \P32 . For

a prime pof the form 16n+ 1 we have p∈ P32 ∩ P64 or p̸∈ P64 ∪ P32.

For further developments similar to Kaplansky’s result we refer to [2]. One can

show that the representations in Theorem 1.1 are unique (see Problem 3.23 in [6]).

2. Case (vii)

We are going to use elementary ideas in the next three sections.

PRIMES OF THE FORM ±a2±qb27

THEOREM 2.1. [Gauss] For every pand qodd prime numbers we have

(8) p

qq

p= (−1)p−1

2

q−1

2.

with notation ·

p, deﬁned for every odd prime pand every acoprime with pknown

as the Legendre symbol:

(9) a

p=

1if the equation x2≡a(mod p)has a solution,

−1if the equation x2≡a(mod p)has no solution

We think that this method can be used to prove all the statements in Theorem 1.1

except (xi), (xiv), and (xvii)-(xx). The exceptions are either known (see [6]) or shown

in the last section. We learned about this next technique from [17] and [18].

Necessity: If p=x2+ 7y2then p≡x2(mod 7). Clearly we may assume p > 7.

Therefore, xmay be assumed to be diﬀerent of zero. Then the residues of p(mod 7)

are 1, 2, or 4. Let us suppose that p≡r(mod 14) with r∈ {0,1,2, ..., 13}. Because

pis prime, rmust be an odd number, not a multiple of 7 and which equals 1, 2

or 4 (mod 7). This leads to only three such residues, i.e. r∈ {1,9,11}, which are

covered by the odd squares j2,j∈ {1,3,5}.

Suﬃciency: We may assume that p > 2. Let us use the hypothesis to show that the

equation x2=−7 has a solution. Let pbe a prime of the form 14k+r,r∈ {1,9,11},

k∈N∪ {0}. By the Quadratic Reciprocity, we have (7

p)(p

7)=(−1)3(p−1)

2. Since

(−1

p) = (−1)p−1

2, then

(−7

p) = (−1)p−1

2(7

p) = (−1)p−1

2+3(p−1)

2(p

7) = (r′

7),where p = 7(2k′)+r′, r′∈ {0,1, .., 6}.

This shows that if r′∈ {1,2,4}we have a solution x0for the equation x2≡ −7

(mod p).

Let us now apply the Pigeonhole Principle: we let m∈Nbe in such a way that

m2< p < (m+ 1)2. We consider the function g:{0,1,2, ..., m}×{0,1,2, ..., m} →

{0,1,2, ...., p −1}deﬁned by g(u, v)≡u+vx0(mod p). Since (m+ 1)2> p, we

must have two distinct pairs (a′′, b′′ ) and (a′, b′) such that g(a′′, b′′ ) = g(a′, b′). Then

a′′ −a′≡(b′−b′′)x0(mod p). Then, if we let a=a′′ −a′, and b=b′−b′′ we get

that 0 < q := a2+ 7b2≡b2(x2

0+ 7) ≡0 (mod p). But, q=a2+ 7b2≤m2+ 7m2=

8m2<8p. It follows that q∈ {p, 2p, 3p, 4p, 5p, 6p, 7p}. We need to eliminate the

8 EUGEN J. IONASCU AND JEFF PATTERSON

cases q∈ {2p, 3p, 4p, 5p, 6p, 7p}. If q= 7pthen 7p=a2+ 7b2which implies that a

is a multiple of 7, or a= 7a′, which gives p=b2+ 7a′2as wanted.

If q= 3p, then q= 3(14k′+r) = 7ℓ+swhere s∈ {3,5,6}. But this is impossible

because q≡a2(mod 7). The same argument works if q= 6p, because r′∈ {1,2,4}

if and only if 6r′∈ {3,5,6}(mod 7). Similarly, the case p= 5pis no diﬀerence.

If q= 2por a2+ 7b2= 2pimplies that aand bcannot be both odd, since in this

case a2+ 7b2is a multiple of 8 and 2pis not. Therefore aand bmust be both even,

but that shows that 2pis a multiple of 4. Again this is not the case.

Finally, if q= 4pthen the argument above works the same way but in the end we

just simplify by a 4.

3. Cases q∈ {11,17,19}

Let us observe that the characterizations in Theorem 1.1 for the cases when one

needs another polynomial of degree bigger than 2, are not easily checked for big

primes p. Next we use still similar elementary methods to show the following result

which seems to be the best what one can hope for in terms of a characterization in

which certain quadratic forms of the form a2+qb2cannot be separated by simply

the quadratic residues of odd numbers modulo 4q.

THEOREM 3.1. (i) A prime p > 17 is of the form a2+ 17b2or 2p=a2+ 17b2,

for some a, b ∈Nif and only if p≡(2j+ 1)2(mod 68) for some j= 0, ..., 7.

(ii) The representation of a prime as in part (a) is exclusive, i.e. a prime pcannot

be of the form a2+ 17b2and at the same time 2p=x2+ 17y2, for some x, y ∈N.

PROOF (i) “ ⇒” If the prime pcan be written p=a2+ 17b2then p≡a2(mod

17) with anot divisible by 17. We observe that aand bcannot be both odd or both

even. Then p≡1 (mod 4). If p= 68k+rwith r∈ {0,1,2, ..., 67}then r≡1

(mod 4), not a multiple of 17 and a quadratic residue modulo 17, i.e. r= 17ℓ+r′

with r′∈ {1,2,4,8,9,13,15,16}. This gives r∈ {1,9,13,21,25,33,49,53}. One can

check that these residues are covered in a one-to-one way by the odd squares j2,

j∈ {1,3,5,7,9,11,13,15}.

If 2p=a2+ 17b2then 2p≡a2(mod 17) with anot divisible by 17. In this case

aand bmust be both odd and then 2p=a2+ 17b2≡2 (mod 8). This implies,

as before, that p≡1 (mod 4). If p= 68k+rwith r∈ {0,1,2, ..., 67}then r≡1

(mod 4), not divisible by 17 and 2ris a quadratic residue modulo 17. Interestingly

enough, we still have r∈ {1,9,13,21,25,33,49,53}.

PRIMES OF THE FORM ±a2±qb29

“⇐” We have p≡j2(mod 17) and so ( p

17 ) = 1. By the Theorem 2.1, we have

(17

p)( p

17 ) = (−1)8(p−1)

2= 1 which implies (17

p) = 1.

Since (−1

p)=(−1)p−1

2, we get that (−17

p)=(−1)p−1

2. If p= 68k+j2with

j∈ {1,3,5,7,9,11,13,15}, we see that (−17

p) = 1. Therefore x2≡ −17 (mod p) has

a solution x0. As in the case q= 7, if we use the same idea of the Pi Pigeonhole

Principle we obtain that q=a2+ 17b2<18pfor some a, b ∈Zand q≡0 (mod p).

Hence q=ℓp with ℓ∈ {1,2, ..., 17}. We may assume that gcd(a, b) = 1, otherwise

we can simplify the equality q=ℓp by gcd(a, b) which cannot be p. Clearly if ℓ= 1,

ℓ= 2 or ℓ= 17 we are done. Since q≡0, 1 or 2 (mod 4) and p≡1 (mod 4)

we cannot have ℓ∈ {3,7,11,15}. If ℓ∈ {4,8,12,16},ℓ= 4ℓ′, we can simplify the

equality by a 4 and reduce this case to ℓ′∈ {1,2,3,4}. Each one of these situations

leads to either the conclusion of our claim or it can be excluded as before or reduced

again by a 4.

(Case ℓ= 5 or ℓ= 10) Hence q=ℓp =a2+ 17b2≡a2+ 2b2≡0 (mod 5). If bis

not a multiple of 5 then this implies x2≡ −2 (mod 5) which is not true. Hence b

must be a multiple of 5 and then so must be a. Then the equality ℓp =a2+ 17b2

implies that ℓp is a multiple of 25 which is not possible.

(Case ℓ= 6 or ℓ= 14) In this case we must have aand bodd and then q=

2(4s+ 1) = ℓp which is not possible.

(Case ℓ= 13) In this case 4q= (2a)2+ 17(2b)2= 2p(32+ 17(1)2). We will use

Euler’s argument ([6], Lemma 1.4, p. 10) here. If we calculate M= (2b)2[32+

17(1)2]−4q= [3(2b)−2a][3(2b)+2a], we see that 2(13) divides Mand so it divides

either 3(2b)−2aor 3(2b) + 2a. Without loss of generality we may assume that 2(13)

divides 3(2b)−2a. Hence, we can write 3(2b)−2a= 2(13)dfor some d∈Z. Next,

we calculate

2a+ 17d= 3(2b)−2(13)d+ 17d= 3(2b)−9d,

which implies that 2a+ 17d= 3efor some e∈Z. Also, from the above equality we

get that 2b=e+ 3d. Then

2p(26) = 4q= (2a)2+ 17(2b)2= (3e−17d)2+ 17(e+ 3d)2= 26(e2+ 17d2)⇒

2p=e2+ 17d2.

10 EUGEN J. IONASCU AND JEFF PATTERSON

(Case ℓ= 9) We have 4q= (2a)2+ 17(2b)2= 2p(12+ 17(1)2). We calculate

M= (2b)2[12+ 17(1)2]−4q= (2b−2a)(2b+ 2a), we see that 2(9) divides Mand

so it divides either 2b−2aor 2b+ 2a. We need to look into two possibilities now.

First 2(9) divides one of the factors 2b−2aor 2b+ 2a, or 2(3) divides each one of

them. In the second situation we can see that 3 divides 4a= 2b+ 2a−(2b−2a)

and so 3 must divide btoo. This last possibility is excluded by the assumption that

gcd(a, b) = 1. Without loss of generality we may assume that 2(9) divides 2b−2a.

Hence, we can write 2b−2a= 2(9)dfor some d∈Z. We set, 2a=e−17dand

observe that 2b= 2a+ 18d=e−17d+ 18d=e+d. Then

2p(18) = 4q= (2a)2+ 17(2b)2= (e−17d)2+ 17(e+d)2= 18(e2+ 17d2)⇒

2p=e2+ 17d2.

(ii) To show this claim, we may use Euler’s argument as above.

For primes qwhich are multiples of four minus one, the patterns suggest that we

have to change the modulo but also there are more trickier changes. Let us look at

the cases q= 11 and q= 19. In case q= 11, we have seen that the quadratic form

a2+ 11b2in Theorem 1.1 can be separated by a polynomial from the other possible

forms of representing primes which are quadratic residues of odd numbers modulo

22.

THEOREM 3.2. (i) A prime p > 11 is of the form a2+ 11b2or 3p=a2+ 11b2,

for some a, b ∈Nif and only if p≡(2j+ 1)2(mod 22) for some j= 0, ..., 4.

(ii) A prime p > 19 satisﬁes 4p=a2+ 19b2, for some a, b ∈Nif and only if

p≡(2j+ 1)2(mod 38) for some j= 0, ..., 8.

(iii) The representations of a prime as in part (i) are exclusive, i.e. a prime p

cannot be in both representations.

We leave these proofs for the interested reader.

4. Proof of Theorem 1.6

Clearly the inclusions A∩B⊂Cand C∩A⊂Bare covered by Proposition 1.5.

To show B∩C⊂Awe will ﬁrst prove it for t= 2pwith pa prime. Since 2p=a2+b2

we have a2≡ −b2(mod p). Because p > 2, acannot be divisible by pand so it

has an inverse (mod p) say a−1. This shows that x0=ba−1is a solution of the

equation x2≡ −1 (mod p). Similarly since 2p= 2(x2−xy +y2) we get that

PRIMES OF THE FORM ±a2±qb211

4(x2−xy +y2) = (2x−y)2+ 3y2≡0 (mod p). This gives a solution y0of the

equation x2≡ −3 (mod p). So, we have z0=x0y0satisfying z2

0≡3 (mod p). Let us

now apply the Pigeonhole Principle as before: we let m∈Nbe in such a way that

m2< p < (m+ 1)2. We consider the function g:{0,1,2, ..., m}×{0,1,2, ..., m} →

{0,1,2, ...., p −1}deﬁned by g(u, v)≡u+vz0(mod p). Since (m+ 1)2> p, we

must have two distinct pairs (a′′, b′′ ) and (a′, b′) such that g(a′′, b′′ ) = g(a′, b′). Then

a′′ −a′≡(b′−b′′)z0(mod p). Then, if we let r=a′′ −a′, and s=b′−b′′ we get that

q:= r2−3s2≡s2(z2

0−3) ≡0 (mod p). So, qneeds to be a multiple of p. If q= 0

then r=±s√3 which is not possible because rand sare integers not both equal

to zero. If q > 0 then 0 < q ≤r2< p, which is again impossible. It remains that

q < 0, and so 0 <−q= 3s2−r2≤3s2<3p. This leaves only two possibilities for

q: either q=−por q=−2p. Hence, we need to exclude the case 3s2−r2=p. This

implies 4p= 12s2−4r2= (2x−y)2+ 3y2. Then 4r2+ (2x−y)2≡0 (mod 3). Since

−1 is not a quadratic residue modulo 3 we must have rdivisible by 3 which is gives

p= 3 but we cannot have 6 = a2+b2. It remains that 2p= 3s2−r2. Let us observe

that in this case sand rcannot be both even or of diﬀerent parities since pmust be

of the form 4k+ 1. Hence, we have the representation p= (3s+r

2)2−3(s+r

2)2.

To prove the inclusion in general we just need to observe that for any number

t∈B∩Cand a prime p > 2 dividing t, then if pis of the form 4k+ 3 then it divides

aand band so p2divides t. The same is true if pis of the form 6k−1. Clearly

all the primes that appear in the decomposition of tto an even power they can be

factored out and reduce the problem to factors of the form 12k+ 1 but for these

factors we can apply the above argument and use the identities:

(y2−3x2)(v2−3u2) = (3ux +vy)2−3(xv +uy)2,

2(x2−3y2) = 3(x+y)2−(x+ 3y)2.

References

[1] P. Barrucand and H. Cohn, Note on primes of type x2+ 32y2, class number and residuacity,

J. Reine Angew. Math. 238 (1969), pp. 67-70.

[2] D. Brink, Five peculiar theorems on simultaneous representation of primes by quadratic forms,

J. Number Theory 129 (2009), no. 2, pp. 464-468

[3] R. Chandler and E. J. Ionascu, A characterization of all equilateral triangles in Z3, Integers,

Art. A19 of Vol. 8 (2008)

[4] H. Cohn, A course in computational algebraic number theory, Springer, 1996

[5] H. Cohn, Advanced Topics in Computational Number Theory, Springer, 1999

12 EUGEN J. IONASCU AND JEFF PATTERSON

[6] D. A. Cox, Primes of the Form x2+ny2, Wiley-Interscience, 1989.

[7] R. H. Hudson and K. S. Williams, Representation of primes by the principal form of the

discriminant −Dwhen the classnumber h(−D)is 3, Acta Arithmetica, vol. 57 (1991) pp.

131-153

[8] E. J. Ionascu, A parametrization of equilateral triangles having integer coordinates, Journal of

Integer Sequences, Vol. 10, 09.6.7. (2007)

[9] T. Jackson, A short proof that every prime p≡3(mod 8) is of the form x2+ 2y2,Amer.

Math. Monthly 107 (2000) p. 447.

[10] E. J. Ionascu, A characterization of regular tetrahedra in Z3, J. Number Theory, 129(2009),

pp. 1066-1074.

[11] E. J. Ionascu, Regular octahedrons in {0,1, ..., n}3,Fasc. Math., Vol. 48 (2012), pp. 49-59

[12] E. J. Ionascu and R. Obando, Cubes in {0,1, ..., n}3, Integers, Art A9, Vol 12A (2012) (John

Selfridge Memorial Issue)

[13] E. J. Ionascu and A. Markov, Platonic solids in Z3, J. Number Theory 131 (2011), no. 1, pp.

138-145

[14] I. Kaplansky, The forms x2+ 32y2and x2+ 64y2, Proceedings of the American Mathematical

Society 131 (2003), no. 7, pp. 2299-2300

[15] F. Lemmermeyer, Reciprocity Laws: from Euler to Eisen- stein, Berlin: Springer-Verlag, 2000

[16] I. G. McDonald, Regular simplexes with integer vertices, C. R. Math. Rep. Acad. Sci. Canada,

Vol IX, No 4, (1987), pp. 189-193

[17] I. Niven, H. S. Zuckerman, H. L. Montgomery, An Introduction to the Theory of Numbers,

Fifth Edition, 1991, John Wiley & Sons, Inc.

[18] K. H. Rosen, Elementary Number Theory and its Applications, Fifth Edition, 2005, Addison

Wesley.

[19] B. K. Spearman and K.S. Williams, Representing primes by binary quadratic forms,Amer.

Math. Monthly 99 (1992) pp. 423-426

[20] I. J. Schoenberg, Regular Simplices and Quadratic Forms, J. London Math. Soc. 12 (1937)

pp. 48-55

[21] J. V. Uspensky, On Jacobi’s Arithmetical Theorems Concerning the Simultaneous Represen-

tation of Numbers by Two Diﬀerent Quadratic Forms, Transactions of the American Mathe-

matical Society, Vol. 30, No. 2 (Apr., 1928), pp.385-404

[22] D. Zagier, A one-sentence proof that every prime p≡1(mod 4) is a sum of two squares,

Amer. Math. Monthly 97 (1990) p. 144

This is also partially addressed in Silverman’s Advanced topic in elliptic curves.

The answer is in general negative: it is true iﬀ the ray class group of associated

order is a 2-group. There are only ﬁnitely many such orders. Dror Speiser The

answer to our question is positive if and only if the class group has exponent 2. The

key word is genus theory for one direction, and norm limitation theorems from class

ﬁeld theory in the other. Franz Lemmermeyer ﬁnitely many if D is assumed to be

positive. Franz Lemmermeyer

There are two situations where a positive integral form represents all the primes

(at least those that do not divide the discriminant) given by arithmetic progressions.

One situation, appropriate for your x2+ny2, is when n is an idoneal number, which

is when there is only one class per genus. This includes the case of only one genus,

but also such things as x2+ 5y2, where the other class of that discriminant is in a

PRIMES OF THE FORM ±a2±qb213

diﬀerent genus, 2x2+ 2xy + 3y2. Note that we also know exactly what primes are

represented by the second form.

It is also good enough when a genus of two classes is simply one class and its

opposite, as in 3x2±2xy + 5y2. Either form represents all primes with certain

values modulo 56. Note that this cannot happen with the principal genus.

In general, there are elaborate conditions on what primes are represented by the

principal form. Typical for class number 3: (Gauss) a prime pis represented by

x2+ 27y2if and only if 2 is a cubic residue (mod p), which is to say that z3−2

factors into three distinct linear factors (mod p). A prime p > 3 with (−44|p) = 1 is

represented by x2+11y2if and only if z3+z2−z+ 1 factors into three distinct linear

factors (mod p). For all the class number three discriminants, see K. S. Williams and

R. H. Hudson, Acta Arithmetica, vol. 57 (1991) pages 131-153, Representation of

primes by the principal form of the discriminant −Dwhen the classnumber h(−D)

is 3.

For classnumber 4: (Gauss) a prime is represented by x2+ 64y2if and only if 2

has four distinct fourth roots (mod p), which is to say that z4−2 factors into four

distinct linear factors (mod p). Note that p≡1 (mod 8) anyway. A prime p > 3

with (−56|p) = 1 is represented by x2+ 14y2if and only if z4+ 2z2−7 factors into

four distinct linear factors (mod p). For all the class number four discriminants, see

K. S. Williams and D.Liu, Tamkang Journal of Mathematics, vol. 25 (1994) pages

321-334, Representation of primes by the principal form of negative discriminant

−Dwhen h(−D) is 4.

For a table with all discriminants from -3 to -451, all class numbers mixed together,

see pages 539-542 in Advanced Topics in Computational Number Theory by Henri

Cohen, 1999. The table is called “Discriminants and Hilbert class ﬁelds of imaginary

quadratic ﬁelds.” The polynomial given tells you, once a prime is represented by the

principal genus of a discriminant, what polynomial must factor completely for the

prime to be represented by the principal form itself. This table gives the polynomials

fn(x) promised in Theorem 9.2 on page 180 of Primes of the form x2+ny2by David

A. Cox.

If you cannot ﬁnd the two articles or the wonderful Cohen table, email me. My

websites are currently down, some of it is usually posted there. The thing about

Cohen’s table is that it is diﬃcult to ﬁnd a polynomial that works, it is incredibly

14 EUGEN J. IONASCU AND JEFF PATTERSON

diﬃcult to ﬁnd one with small coeﬃcients, compare some articles by Kaltofen and

Yui.

http://pari.math.u-bordeaux.fr/archives/pari-dev-9903/msg00053.html

http://pari.math.u-bordeaux.fr/archives/pari-dev-0210/msg00041.html

Current address : Department of Mathematics, Columbus State University, 4225 University

Avenue, Columbus, GA 31907

E-mail address:math@ejonascu.edu, j3phr3y@gmail.com