1 Introduction and Statement of Results

Let N≥1 be an integer, and let Λ⊂ℝN be a lattice of full rank. Given a basis a 1,…,a N for Λ we can write A=(a 1,…,a N ) for the corresponding basis matrix, and then Λ=AN. The corresponding norm form is defined as

$$Q_A({\boldsymbol{x}}) = {\boldsymbol{x}}^t A^t A {\boldsymbol{x}}, $$

and we say that the lattice is integral if the coefficient matrix A t A of this quadratic form has integer entries; it is easy to see that this definition does not depend on the choice of a basis. The matrix A t A is called a Gram matrix of the lattice Λ. Integral lattices are central objects in arithmetic theory of quadratic forms and in lattice theory. We define \(\operatorname{det}(\varLambda)\) to be \(|\operatorname{det}(A)|\), again independent of the basis choice, and (squared) minimum or minimal norm

$$|\varLambda| = \min\bigl\{ \|{\boldsymbol{x}}\|^2 : {\boldsymbol{x}}\in\varLambda\setminus\{{\boldsymbol{0}}\} \bigr\} = \min\bigl\{ Q_A({\boldsymbol{y}}) : {\boldsymbol{y}}\in {\mathbb{Z}}^N \setminus \{{\boldsymbol{0}}\} \bigr\}, $$

where ∥ ∥ stands for the usual Euclidean norm. Then each xΛ such that ∥x2=|Λ| is called a minimal vector, and the set of minimal vectors of Λ is denoted by S(Λ). A lattice Λ is called well-rounded (abbreviated WR) if the set S(Λ) contains N linearly independent vectors. These vectors do not necessarily form a basis for lattices in any dimension N, however they are known to form a basis for all N≤4 (see, for instance [15]); we will refer to such a basis as a minimal basis for Λ. WR lattices are important in discrete optimization, in particular in the investigation of sphere-packing, sphere-covering, and kissing-number problems (see [12]), as well as in coding theory (see [1]). Properties of WR lattices have also been investigated in [13] in connection with Minkowski’s conjecture and in [8] in connection with the linear Diophantine problem of Frobenius. A particularly interesting and important class of WR lattices are the integral well-rounded lattices (abbreviated IWR). The main objective of the current paper is to study the properties of IWR lattices in the plane, extending some of the previous results of Refs. [3], [4], and [6] with a view toward discrete optimization problems. Specifically, our investigation is motivated by the following three questions, which are the direct analogs of the questions asked about sublattices of the hexagonal lattice in [2]:

Question 1

Which IWR lattice Λ of a fixed determinant Δ maximizes the minimal norm? Since the density of circle-packing associated with Λ is equal to π|Λ|/Δ, this choice of Λ also maximizes the packing density.

Question 2

Which IWR lattice Λ of a fixed determinant Δ maximizes the signal-to-noise ratio (defined below)?

Question 3

How many IWR lattices of a fixed determinant Δ are there, up to rotation and reflection? This number is known to be finite.

Given a lattice Λ∈ℝN, we can regard its nonzero points as transmitters which interfere with the transmitter at the origin, and then a standard measure of the total interference of Λ is given by E Λ  (2), where

$$ E_{\varLambda}(s) = \sum_{{\boldsymbol{x}}\in\varLambda\setminus\{ {\boldsymbol{0}}\}} \frac{1}{\|{\boldsymbol{x}}\|^{2s}} $$
(1)

is the Epstein zeta-function of Λ, and the signal-to-noise ratio of Λ is defined by

$$ \operatorname{SNR}(\varLambda) = 10 \log_{10} \frac{1}{9E_{\varLambda}(2)}, $$
(2)

as in Ref. [2]. To maximize \(\operatorname{SNR}(\varLambda)\) on the set of all planar IWR lattices of a fixed determinant Δ is the same as to minimize E Λ (2) on this set. In fact, E Λ (s) for each real s≥3 is maximized by the same planar WR lattice of fixed determinant Δ that maximizes |Λ|, and vice versa (this follows from an old result of S. S. Ryskov [16]; see Lemma 3.1 below). Moreover, Lemma 3.2 and Remark 3.1 below suggest that it may likely be so for s=2 as well. This would mean that Questions 1 and 2 are equivalent, which is not always so for non-WR lattices, as demonstrated in [2].

Suppose that we have a network of transmitters positioned at the points of a planar lattice Λ. The plane is tiled with translates of the Voronoi cell of Λ, which are the cells serviced by the corresponding transmitters at their centers. The packing density of Λ is precisely the proportion of the plane covered by the transmitter network. IWR lattices allow for transmitters of the same power and for integral distances between transmitters in the network, which simplifies positioning. Hence a lattice that answers Question 1 maximizes coverage and the lattice that answers Question 2 maximizes signal-to-noise ratio for a 2-dimensional lattice transmitter network with a fixed cell area Δ and integral distances between transmitters. Our Lemma 3.2 and Remark 3.1 below suggest that this may be done simultaneously. We present an algorithm for finding a lattice answering Question 1 for each possible value of Δ in Theorem 1.3. It is also interesting to understand how many choices for positioning a network of equal-power transmitters with integral distances between them and fixed cell area are there—this is an application of Question 3; we estimate this number in Theorem 1.4. We refer the reader to Ref. [17] for further information about transmitter networks on planar lattices.

To discuss the proposed questions in further detail, we build on a convenient description of IWR lattices which we outline next. An important equivalence relation on lattices is geometric similarity: two lattices Λ 1,Λ 2⊂ℝN are called similar, denoted Λ 1Λ 2, if there exists a positive real number α and an N×N real orthogonal matrix U such that Λ 2=αUΛ 1. It is easy to see that similar lattices have the same algebraic structure, i.e., for every sublattice Γ 1 of a fixed index in Λ 1 there is a sublattice Γ 2 of the same index in Λ 2 so that Γ 1Γ 2. Most geometric and optimization properties of lattices (such as packing density, covering thickness, kissing number, signal-to-noise ratio, etc.) are invariant on similarity classes. Moreover, a WR lattice can only be similar to another WR lattice, so it makes sense to speak of WR similarity classes of lattices. If Λ⊂ℝ2 is a full rank WR lattice, then its set of minimal vectors S(Λ) contains 4 or 6 vectors, and this number is 6 if and only if Λ is similar to the hexagonal lattice

(see, for instance Lemma 2.1 in [7]). Any two linearly independent vectors x,yS(Λ) form a minimal basis. While this choice is not unique, it is always possible to select x,y so that the angle θ between these two vectors lies in the interval [π/3,π/2], and any value of the angle in this interval is possible. From now on when we talk about a minimal basis for a WR lattice in the plane, we will always mean such a choice. Then the angle between minimal basis vectors is an invariant of the lattice, and we call it the angle of the lattice Λ, denoted θ(Λ); in other words, if x,y is any minimal basis for Λ and θ is the angle between x and y, then θ=θ(Λ) (see [5] for details and proofs of the basic properties of WR lattices in ℝ2). In fact, it is easy to notice that two WR lattices Λ 1,Λ 2⊂ℝ2 are similar if and only if θ(Λ 1)=θ(Λ 2) (see [5] for a proof). Therefore the set of all similarity classes of WR lattices in ℝ2 is bijectively parameterized by the set of all possible values of the angle, which is the interval [π/3,π/2]. On the other hand, this parameterization becomes less trivial if we talk about similarity classes of planar IWR lattices. In other words, one may wonder what are the possible values of θ(Λ) in the interval [π/3,π/2] if Λ is IWR?

The following parameterization follows from the classical theory of integral lattices and quadratic forms (see, for instance Chap. 1 of [12]).

Proposition 1.1

Let Λ⊂ℝ2 be an IWR lattice, then

$$ \cos\theta(\varLambda) = \frac{p}{q},\qquad \sin \theta(\varLambda) = \frac{r\sqrt{D}}{q} $$
(3)

for some p,r,q,D∈ℤ>0 such that

$$ p^2+Dr^2=q^2,\quad \gcd(p,q)=1,\quad \frac{p}{q} \leq\frac{1}{2},\quad \mbox{\textit{and}}\ D\ \mbox{\textit{squarefree}}, $$
(4)

and so Λ is similar to

(5)

Moreover, for every p,r,q,D satisfying (4), Ω D (p,q) is an IWR lattice with the angle θ(Ω D (p,q)) satisfying (3), and Ω D (p,q)∼Ω D(p′,q′) if and only if (p,r,q,D)=(p′,r′,q′,D′). In addition, if Λ is any IWR lattice similar to Ω D (p,q), then

$$ \vert \varLambda \vert \geq\biggl \vert \frac{1}{\sqrt{q}} \varOmega_D(p,q) \biggr \vert , $$
(6)

where the lattice \(\frac{1}{\sqrt{q}} \varOmega_{D}(p,q)\) is also IWR. Due to this property, we call \(\frac{1}{\sqrt{q}} \varOmega_{D}(p,q)\) a minimal IWR lattice in its similarity class.

Remark 1.1

Notice in particular that the integer lattice ℤ2=Ω 1(1,1) and the hexagonal lattice \({\mathcal{H}}= \varOmega_{3}(1,2)\).

Hence we see that the set of similarity classes of planar IWR lattices is in bijective correspondence with the set of 4-tuples (p,r,q,D) satisfying (4). Here is an explicit characterization of this set of 4-tuples, which will be useful to us.

Lemma 1.2

Let D be a positive squarefree integer and m,n∈ℤ with gcd(m,n)=1 and \(\sqrt{\frac{D}{3}} \leq\frac {m}{n} \leq\sqrt{3D}\). Now p,r,q,D∈ℤ>0 satisfy (4) if and only if

$$ p = \frac{| m^2-Dn^2 |}{2^e \gcd(m,D)},\qquad r = \frac{2mn}{2^e \gcd(m,D)},\qquad q= \frac{m^2 + Dn^2}{2^e \gcd(m,D)}, $$
(7)

where

$$ e = \left \{ \begin{array}{l@{\quad}l} 0 & \mbox{\textit{if either} $2 \mid D$, \textit{or} $2 \mid(D+1), mn$} \\[3pt] 1 & \mbox{\textit{otherwise}}. \end{array} \right . $$
(8)

We prove Lemma 1.2 in Sect. 2. Further, let us say that an IWR planar lattice Λ is of type D for a squarefree D∈ℤ>0 if it is similar to some Ω D (p,q) as in (5). The type is uniquely defined, i.e., Λ cannot be of two different types. Moreover, a planar IWR lattice Λ is of type D for some squarefree D∈ℤ>0 if and only if all of its IWR finite index sublattices are also of type D. If this is the case, Λ contains a sublattice similar to Ω D (p,q) for every 4-tuple (p,r,q,D) as in (4). Hence the set of planar IWR lattices is split into types which are indexed by positive squarefree integers with similarity classes inside of each type D being in bijective correspondence with solutions to the ternary Diophantine equation p 2+r 2 D=q 2 as parameterized in Lemma 1.2.

Remark 1.2

In fact, the set of similarity classes of IWR lattices of a fixed type can be endowed with a semigroup structure, coming from the geometric group law on rational points of a Pell conic; we include a brief discussion of this fact in Sect. 2 below (Lemma 2.2). The correspondence between IWR lattices and solutions to the Pell-type equations as described above follows from the theory of integral quadratic forms, as we indicated; it can also be obtained by an elementary argument, however we do not include it here in the interest of brevity of the exposition.

In Sect. 3 we discuss a possible connection between Questions 1 and 2, and then use the above-described correspondence to provide an algorithmic procedure in answer to Question 1.

Theorem 1.3

A positive real number Δ is a determinant value of IWR lattices if and only if \(\Delta= M\sqrt{D}\) where M,D∈ℤ>0 with D squarefree so that the set

$$ \operatorname{mn}(M) = \biggl\{ (m,n) \in {\mathbb{Z}}^2_{>0} : \gcd(m,n)=1, \sqrt{\frac {D}{3}} \leq\frac{m}{n} \leq\sqrt{3D}, \frac{2mn}{2^e \gcd(m,D)}\, \bigg|\, M \biggr\}, $$
(9)

where e is as in (8), is not empty. Fix such a Δ, and let \((m,n) \in \operatorname{mn}(M)\) be the pair that maximizes the expression

$$\frac{m}{n} + D \frac{n}{m} $$

on \(\operatorname{mn}(M)\). Now define p,r,q as in (7) for this choice of m,n and let k=M/r. Then

$$ \varLambda= \sqrt{\frac{k}{q}} \varOmega_D(p,q) $$
(10)

is an IWR lattice with \(\operatorname{det}(\varLambda)=\Delta\) and |Λ|=kq which maximizes |Λ| among all planar IWR lattices with determinant Δ. This lattice can be found in a finite number of steps for each fixed Δ.

Remark 1.3

Some examples of such norm-maximizing lattices are presented in Table 1 below.

Table 1 Examples of IWR lattices Λ with \(\operatorname{det}(\varLambda)=\Delta\) that maximize |Λ| on \(\operatorname{IWR}(\Delta)\)

In Sect. 4 we obtain the following counting estimate, which answers Question 3.

Theorem 1.4

For Δ∈ℝ>0, define \(\operatorname{IWR}(\Delta)\) to be the set of all planar IWR lattices, up to rotation and reflection, with determinant =Δ. Then the set \(\operatorname{IWR}(\Delta)\) is finite for any Δ, and it is only nonempty if \(\Delta=M\sqrt{D}\) with the set \(\operatorname{mn}(M)\) as in (9) nonempty. In this latter case, the cardinality of the set \(\operatorname{IWR}(\Delta)\) satisfies

$$ \bigl \vert \operatorname{IWR}(\Delta) \bigr \vert \leq \frac{1}{2} \sum_{r \mid M} 2^{\omega(rD)}. $$
(11)

Moreover,

$$ \bigl \vert \operatorname{IWR}(\Delta) \bigr \vert \ll\sum _{r \mid M} \sum_{g \mid r} \mu \biggl( \frac{r}{g} \biggr) \frac{\tau(g^2D)}{\sqrt{\omega(gD)}}, $$
(12)

where τ(u) is the number of divisors, ω(u) is the number of prime divisors, and μ(u) is the Möbius function of an integer u. The constant in the Vinogradov notationdoes not depend on Δ.

We are now ready to proceed.

2 Parameterization Lemmas

In this section we start by proving Lemma 1.2. The following lemma is used in the proof, which we state here for the reader’s convenience.

Lemma 2.1

(Lemma 2.1 of [6])

Consider the Diophantine equation

$$ \alpha x^2 + \beta xy + \gamma y^2 = \delta z^2, $$
(13)

where α,β,γ,δ∈ℤ with β 2≠4αγ and δ≠0. Then either this equation has no integral solutions with z≠0, or all such solutions (x,y,z) of (13) are rational multiples of

(14)

where m,n∈ℤ with gcd(m,n)=1 and m≥0; here (a,b,c) is any integral solution to (13) with c≠0. In this later case, every multiple of (14) is a solution to (13) by homogeneity of (13).

Proof of Lemma 1.2

We start by applying Lemma 2.1 to the equation p 2+Dr 2=q 2 for a fixed squarefree D: since (p,r,q)=(1,0,1) is an integral solution of this equation with q≠0, the lemma guarantees that all positive integral solutions of this equation with q≠0 are rational multiples of

$$ p_0=\big|m^2-Dn^2\big|,\qquad r_0=2mn,\qquad q_0=m^2+Dn^2, $$
(15)

where m,n range over all relatively prime non-negative integers, not both 0. In order for (p,r,q,D) to satisfy (4), we need two more conditions: gcd(p,q)=1 and p/q≤1/2. First consider p 0,r 0,q 0 as in (15) and notice that the fact that \(p_{0}^{2}+Dr_{0}^{2}=q_{0}^{2}\) implies that gcd(p 0,q 0)=gcd(r 0,q 0)=gcd(p 0,r 0,q 0). Since gcd(m,n)=1, it is easy to notice that gcd(p 0,q 0)=2egcd(m,D), where e is as in (8). Hence if we define p,r,q as in (7), we ensure that they are relatively prime, and this covers all the relatively prime solutions of our equation for each fixed D. Finally, we need to select only the solutions with p/q≤1/2, which means that

$$-1/2 \leq\frac{m^2-Dn^2}{m^2+Dn^2} \leq1/2, $$

and so we must have

$$ \sqrt{\frac{D}{3}} \leq\frac{m}{n} \leq\sqrt{3D}. $$
(16)

This completes the proof of the theorem. □

We also briefly mention the algebraic structure of the planar IWR lattices.

Lemma 2.2

Let D>0 be squarefree and let \({\mathcal{C}}(D)\) be the set of similarity classes of all IWR lattices of type D. Let us write C D (p,q) for each such class, i.e., for each (p,q) satisfying (4):

$$ C_D(p,q) = \bigl\{ \varLambda: \varLambda\sim \varOmega_D(p,q) \bigr\}, $$
(17)

and so

$${\mathcal{C}}(D) = \bigl\{ C_D(p,q) : (p,q) \text{ \textit{satisfy} (4)} \bigr\}. $$

Then the set \({\mathcal{C}}(D)\) has the structure of an abelian semigroup, induced by the composition law on rational points of the Pell conic corresponding to D.

Proof

A Pell conic is a curve given by the equation x 2Dy 2=1. The following commutative composition law on the set of rational points on a Pell conic is defined in [11]:

$$ (x_1,y_1) + (x_2,y_2) = (x_1x_2+Dy_1y_2, x_1y_2+x_2y_1). $$
(18)

In [11], this operation is also described geometrically by analogy with addition on an elliptic curve. Notice that a rational point (x,y)=(q/p,r/p) is on this curve if and only if

$$ p^2+r^2D=q^2. $$
(19)

Then (18) induces the following commutative composition law on the set of solutions (p,r,q) of (19):

$$ (p_1,r_1,q_1) + (p_2,r_2,q_2) = \frac{1}{g} (p_1p_2, r_1q_2+r_2q_1, q_1q_2+Dr_1r_2), $$
(20)

where g=gcd(p 1 p 2,r 1 q 2+r 2 q 1,q 1 q 2+Dr 1 r 2). It is easy to check that the set of solutions of (19) is closed under this operation. Moreover, since D>0,

$$\frac{q_1q_2+Dr_1r_2}{p_1p_2} \geq\frac{q_1}{p_1} \times\frac{q_2}{p_2}, $$

and so whenever p 1/q 1,p 2/q 2≤1/2, we will have

$$\frac{p_1p_2}{q_1q_2+Dr_1r_2} \leq\frac{1}{4}. $$

This ensures that \({\mathcal{C}}(D)\) is closed under this operation, and hence has a structure of an abelian semigroup, although not a monoid: the point (1,0,1), which serves as identity, is not in \({\mathcal{C}}(D)\). □

3 Optimization Properties

In this section we investigate Questions 1 and 2. Let Λ be a planar IWR lattice, then

$$ \varLambda= \sqrt{\frac{k}{q}} U \varOmega_D(p,q) $$
(21)

for some (p,r,q,D) as in (4), k∈ℤ>0, and a 2×2 real orthogonal matrix U. Now suppose that \(\Delta= M\sqrt {D}\), M∈ℤ>0, is fixed and let \(\varLambda\in \operatorname{IWR}(\Delta)\) be given as in (21) so that kr=M. Then

$$ |\varLambda| = kq = \frac{Mq}{r}, $$
(22)

and so to maximize |Λ| on \(\operatorname{IWR}(\Delta)\) we need to maximize q/r. A trivial upper bound for |Λ| is given by \(\frac{2\Delta }{\sqrt{3}}\): this is just a restatement of the fact that Δ=|Λ|sinθ(Λ) and θ∈[π/3,π/2].

We start by discussing a connection between the problems of maximizing |Λ| and minimizing E Λ (s) on sets of WR lattices of fixed determinant in ℝ2. This discussion is an adaptation and correction of Lemma 5.2 of [6].

Lemma 3.1

Let Δ be a positive real number, and let \(\operatorname{WR}_{2}(\Delta)\) be the set of all full rank WR lattices in2 with determinant Δ. Then for any fixed real number s≥3, E Λ (s) is a decreasing function of |Λ| on \(\operatorname{WR}_{2}(\Delta)\).

Proof

Let Q Λ (x,y) be the quadratic form of Λ corresponding to a minimal basis; then

$$ Q_{\varLambda}(x,y) = |\varLambda| \bigl(x^2+y^2+2xy \cos\theta\bigr), $$
(23)

where θ=θ(Λ)∈[π/3,π/2] and |Λ| is as in (22). Now

$$ \cos\theta= \frac{\sqrt{|\varLambda|^2 - \Delta^2}}{|\varLambda|} = \sqrt{ 1 - \frac{\Delta^2}{|\varLambda|^2}}, $$
(24)

and 0≤cosθ≤1/2. Lemma 1 of [16] guarantees that E Λ (s) is a decreasing function of cosθ for any real s≥3, and (24) implies that cosθ is an increasing function of |Λ|. Hence E Λ (s) is a decreasing function of |Λ| on \(\operatorname{WR}_{2}(\Delta)\) for s≥3. □

In fact, it seems likely that the statement of Lemma 3.1 should hold for smaller real values of s as well. At the very least, we have the following bounds.

Lemma 3.2

With notation as in Lemma 3.1, let s>1 be real. Then there exist real constants C 1(s) and C 2(s), dependent only on s, such that

$$ \frac{C_1(s)}{|\varLambda|^s} \leq E_{\varLambda}(s) \leq \frac {C_2(s)}{|\varLambda|^s} $$
(25)

for every \(\varLambda\in \operatorname{WR}_{2}(\Delta)\).

Proof

Combining (23) and (24), we obtain

$$Q_{\varLambda}(x,y) = T x^2+ T y^2+2xy \sqrt{T^2-\Delta^2}, $$

where T=|Λ|. The Epstein zeta-function of Λ is then given by

Now recall that since θ∈[π/3,π/2], we must have \(\frac {\sqrt{3}T}{2} \leq\Delta\leq T\), and so \(0 \leq\sqrt{T^{2}-\Delta^{2}} \leq T/2\). Hence for each fixed real s>1, we have

$$ E_{\varLambda}(s) \leq \frac{2}{T^s} \sum_{x,y \in {\mathbb{Z}}_{>0}} \biggl(\frac {1}{ ( x^2+ y^2 )^s} + \frac{1}{ ( x^2+ y^2 - xy)^s} \biggr), $$
(26)

and

$$ E_{\varLambda}(s) \geq \frac{2}{T^s} \sum_{x,y \in {\mathbb{Z}}_{>0}} \biggl( \frac{1}{ ( x^2+ y^2 )^s} + \frac{1}{ ( x^2+ y^2 + xy)^s} \biggr). $$
(27)

Since both series in the bounds of (26) and (27) converge, we have (25). □

Remark 3.1

Since WR lattice Λ with fixed |Λ| and \(\operatorname{det}(\varLambda)\) is unique up to multiplication by an orthogonal matrix U (which does not change the value of E Λ (s) for any s), Lemmas 3.1 and 3.2 make it natural to expect that the total interference of Λ is minimized on \(\operatorname{WR}_{2}(\Delta)\) (and so \(\operatorname{SNR}(\varLambda)\) is maximized) if and only if |Λ| is maximized.

We are now ready to answer Question 1.

Proof of Theorem 1.3

We will now discuss a finite procedure to maximize q/r, and hence |Λ|, on the set \(\operatorname{IWR}(\Delta)\) using finiteness of this set along with Lemma 1.2. First we notice that r has to be a divisor of \(M=\Delta/\sqrt{D}\), hence we can start by going through the list of all possible divisors of M. For each such divisor r, consider all possible decompositions

$$r = \frac{2mn}{2^e \gcd(m,D)} $$

with relatively prime m,n so that \(m/n \in [ \sqrt{D/3}, \sqrt {3D} ]\), as in (7). Out of all such decompositions, we want to pick one which maximizes the ratio

$$q/r = \frac{m^2+Dn^2}{2mn} = \frac{1}{2} \biggl( \frac{m}{n} + D \frac{n}{m} \biggr). $$

This can be done in a finite number of steps, since there are finitely many values for r, a divisor of M, and for each r there are finitely many such m,n. Hence we can choose Λ maximizing |Λ| and \(\operatorname{SNR}(\varLambda)\) on \(\operatorname{IWR}(\Delta)\) to be as in (10). In particular, our argument confirms that Δ is a determinant value of an IWR lattice if and only if it is of the form \(M\sqrt{D}\) with the set \(\operatorname{mn}(M)\) as in (9) nonempty. This completes the proof. □

Remark 3.2

Let us write \(m/n = \sqrt{D}x\) for appropriate \(x \in [ 1/\sqrt {3}, \sqrt{3} ]\). Then

$$q/r = \frac{\sqrt{D}}{2} (x + 1/x). $$

Now, the function f(x)=x+1/x assumes its maximal values on the interval \([ 1/\sqrt{3}, \sqrt{3} ] \) at the endpoints and has a minimum at x=1. Hence, to maximize q/r one should consider m,n with m/n close to the endpoints of the interval \([ \sqrt {D/3}, \sqrt{3D} ]\). Keeping these considerations in mind can reduce the number of computational steps necessary to find maximizer for |Λ| in \(\operatorname{IWR}(\Delta)\) in each particular case.

We give some computational examples in Table 1.

4 Counting Estimates

Here we prove the counting estimates of Theorem 1.4.

Proof of Theorem 1.4

Let \(\Delta=M\sqrt{D}\), as above, so that \(\operatorname{mn}(M)\) defined in (9) is nonempty. First we observe that such sets are in fact finite up to rotation and reflection—this is an immediate consequence of a more general fact that there are only finitely many isometry classes of integral lattices of fixed determinant in a fixed dimension (see remarks on p. 432 of [12]). Suppose now that \(\varLambda\in \operatorname{IWR}(\Delta)\), then we can assume without loss of generality that

$$\varLambda= \sqrt{\frac{k}{q}} \varOmega_D(p,q), $$

where k=M/r and p,r,q are as in (7) for some \((m,n) \in \operatorname{mn}(M)\). Hence the choice of p,r,q determines Λ uniquely. For each rM define

$$ f(r) = \biggl \vert \biggl\{ (p,q) \in {\mathbb{Z}}_{>0}^2 : q^2-p^2 = r^2D,\ \gcd (p,q) = 1,\ 0< \frac{p}{q} \leq\frac{1}{2} \biggr\} \biggr \vert , $$
(28)

then

$$\bigl \vert \operatorname{IWR}(\Delta) \bigr \vert = \sum_{r \mid M} f(r). $$

Hence we want to produce estimates on f(r). Define

$$f_1(r) = \bigl \vert \bigl\{ (p,q) \in {\mathbb{Z}}_{>0}^2 : q^2-p^2 = r^2D,\ \gcd (p,q) = 1 \bigr\} \bigr \vert , $$

and

$$ f_2(r) = \biggl \vert \biggl\{ (p,q) \in {\mathbb{Z}}_{>0}^2 : q^2-p^2 = r^2D,\ 0< \frac{p}{q} \leq\frac{1}{2} \biggr\} \biggr \vert , $$
(29)

and notice that

$$ f(r) \leq\min\bigl\{f_1(r), f_2(r) \bigr\}, $$
(30)

meaning that

$$ \bigl \vert \operatorname{IWR}(\Delta) \bigr \vert \leq\sum _{r \mid M} \min\bigl\{ f_1(r), f_2(r) \bigr\}. $$
(31)

The function f 1(r) is well studied; in particular, the following formula follows from Theorem 6.2.4 of [14]:

$$ f_1(r) = \left \{ \begin{array}{l@{\quad}l} 2^{\omega(r^2D)-1} & \mbox{if $2 \nmid r^{2}D$, $r^{2}D > 1$} \\[3pt] 2^{\omega(r^2D)-1} & \mbox{if $8 \mid r^{2}D$, $r^{2}D$ has odd prime divisors} \\[3pt] 1 & \mbox{if $r^{2}D$ is a power of 2} \\[3pt] 0 & \mbox{otherwise,} \end{array} \right . $$
(32)

hence \(f_{1}(r) \leq2^{\omega(r^{2}D)-1} = 2^{\omega(rD)-1}\). Now (11) follows upon combining (31), (32).

Next we estimate f 2(r). Let c=r 2 D, and let us write

$$ a=q-p,\qquad b=q+p, $$
(33)

then q=(a+b)/2, p=(ba)/2, and ab=c. Let α:=p/q, and assume that 0<α≤1/2. Then let \(\nu=\frac{1+\alpha }{1-\alpha}\), and observe that

$$1 < \nu= \frac{b}{a} \leq3. $$

Since ab=c, we have \(b = \sqrt{\nu c}\), and so

$$\sqrt{c} < b \leq\sqrt{3c}. $$

Therefore

$$ f_2(r) = \bigl \vert \{ b \in {\mathbb{Z}}_{>0} : b \mid c,\ \sqrt{c} < b \leq \sqrt{3c} \} \bigr \vert . $$
(34)

For a positive integer t, Hooley’s \({\it\Delta}\)-function of t (see [9] for detailed information) is defined as

$${\it\Delta}(t) = \max_x \bigl \vert \bigl\{ b \in {\mathbb{Z}}_{>0} : b \mid t,\ e^x < b \leq e^{x+1} \bigr\} \bigr \vert . $$

Take \(x=\log\sqrt{c}\), then

$$\{ b \in {\mathbb{Z}}_{>0} : b \mid c,\ \sqrt{c} < b \leq\sqrt{3c} \} \subseteq \bigl\{ b \in {\mathbb{Z}}_{>0} : b \mid c,\ e^x < b \leq e^{x+1} \bigr\}, $$

since \(\sqrt{3} < e\), and so \(f_{2}(r) \leq {\it\Delta}(c)\). Therefore an estimate on f 2(r) would follow from estimates on \({\it\Delta}(c)\), some of which can be found in Sect. 2 of [3]; in particular, equations (10)–(13) of [3] imply that the bound

$$ f_2(r) \leq O \biggl( \frac{\tau(c)}{\sqrt{\omega(c)}} \biggr) \leq O \bigl( c^{\frac{(1+{\varepsilon}) \log2}{\log\log c}} \bigr) $$
(35)

holds for any ε>0, assuming c is greater than some c 0(ε) for the second inequality; here the constant in O-notation is independent of c.

Next notice that if q 2p 2=r 2 D and gp,q, then gr, since D is squarefree. This implies that

$$ f_2(r) = \sum _{g \mid r} f \biggl(\frac{r}{g} \biggr). $$
(36)

Recall that the Möbius function is defined by

$$\mu(u) = \left \{ \begin{array}{l@{\quad}l} (-1)^{\omega(u)} & \mbox{if $u$ is squarefree} \\[3pt] 0 & \mbox{otherwise;} \end{array} \right . $$

then, applying the Möbius inversion formula to (36), we obtain

$$ f(r) = \sum _{g \mid r} \mu \biggl( \frac{r}{g} \biggr) f_2(g) \ll\sum_{g \mid r} \mu \biggl( \frac{r}{g} \biggr) \frac{\tau(g^2D)}{\sqrt {\omega(g^2D)}} $$
(37)

by (35). This establishes (12) upon the observation that ω(g 2 D)=ω(gD). □

Remark 4.1

Theorems 431 and 432 of [10] state that normal orders of ω(u) and τ(u) are loglogu and 2loglogu, respectively. This implies that one would normally expect

$$\frac{\tau(u)}{\sqrt{\omega(u)}} \leq2^{\omega(u)} $$

for a randomly chosen integer u (in the appropriate sense).