1 Introduction
For
$n \in \mathbb {Z}$
, let
$r_{2}(n)$
denote the number of representations of n as a sum of two squares. In 1932, Estermann [Reference Estermann5] showed that whenever a is a nonzero integer, one obtains the asymptotic formula
for
$\tau = 11/12$
,
$C_{a}> 0$
, which depends only on a, and any
$\varepsilon>0$
. Later, with Weil’s work on Kloosterman sums, Hooley provided an improvement to (1.1) with
$\tau = 5/6$
[Reference Hooley6, page 282]. Using properties of modular groups, Chamizo showed that
$\tau = 2/3$
[Reference Chamizo3, Reference Chamizo4]. For two sets of integers
$W_{1}$
and
$W_{2}$
, denote
We use the notation
to denote the numbers that are a sum of two squares. When a is a nonzero integer, we may survey the number of elements of the set
in intervals. In this direction, Hooley [Reference Hooley7] showed that there exist constants
$C, D$
depending on
$a\neq 0$
and with
$0<C<D$
, so that for large
$x \in \mathbb {R}$
,

Since
$$ \begin{align} r_{2}(n) = 4\cdot\sum_{d|n}\chi_{4}(d), \end{align} $$
where
$\chi _{4}$
is the primitive character modulo
$4$
[Reference Estermann5, (33)], for every
$\varepsilon> 0$
, there exists a constant
$C_{\varepsilon }>0$
so that
$r_{2}(n) \leq C_{\varepsilon }\cdot n^{\varepsilon }$
. Thus, a quick application of the asymptotic formula (1.1) with
$\tau = 2/3$
leads us to a lemma that counts elements of
in short intervals.
Lemma 1.1. If
$\beta $
and
$\varepsilon> 0$
, then
for sufficiently large x.
The following lemma serves to bound the largest gaps.
Lemma 1.2. There exists a constant
$C_{a}>0$
such that there is an element of
in the interval
$[x,x+C_{a}\cdot x^{1/2}]$
whenever
$x \geq 1$
.
Proof. If
$a = 2^{t}a'$
for some nonnegative integer t and odd
$a'$
, then
implies
, since the product of two sums of two squares is itself a sum of two squares. Thus, it is enough to prove the lemma for odd values of a. Now observe that when s is an integer,
Let
$\triangle $
denote the set of integers represented by the quadratic form
$x^2+3y^2$
. We similarly examine the density of the set
.
Lemma 1.3. If
$\chi _{4}(a) = 1$
or
$\chi _{3}(a) = - 1$
, then
.
Proof. Let
$\mathbb {P}$
denote the set of primes. If
$\chi _{4}(a) = 1$
, then by [Reference Iwaniec9, Theorem 1],
If
$\chi _{3}(a) = -1$
, then by [Reference Iwaniec9, Theorem 1],
Since primes
$\equiv 1 \bmod 3$
are in
$\triangle $
and primes
$\equiv 1\bmod 4$
are in
, the proof is complete.
As in Lemma 1.1, we can count elements of the set
in short intervals.
Corollary 1.4. Let
$\varepsilon>0$
. There exists a constant
$H_{a}> 0$
such that for sufficiently large x,
.
Integers that are represented by the quadratic form
$x^2+xy+y^2$
are the same as those for
$x^2+3y^2$
[Reference Moree and te Riele11]. For a positive integer n, denote by
$R_{2}(n)$
the number of solutions to the equation
$n = x^2+xy+y^2$
and by
$\chi _{3}$
the nontrivial character modulo
$3$
. Analogously to (1.2), we have the classical formula (see [Reference Huard, Ou, Spearman, Williams and Berndt8, (7.2)])
$$ \begin{align*} R_{2}(n) = 6\cdot\sum_{d|n}\chi_{3}(d), \end{align*} $$
which is a key ingredient in the proof of Corollary 1.4. When
$\psi $
is a character modulo k (
$k>1$
), define
$$ \begin{align*} F_{\psi}(n) = \sum_{d|n}\psi(d). \end{align*} $$
For natural numbers
$a,k$
, denote by
$P(a,k)$
the unique integer
$t \mid a$
so that if a prime p divides t, then
$p \mid k$
and
$\text {gcd}(a/t,k) = 1$
. The next theorem is a ‘local version’ of a theorem by Müller [Reference Müller12, Theorem 1].
Theorem 1.5. Let
$\psi $
and
$\rho $
be primitive characters modulo
$k> 1$
. If
$a \geq 1$
, then
where
$$ \begin{align*} M_{\psi, \rho}(a) = C_{\psi,\rho}(a)+\bigg\{k^{-1}\sum_{b| P(a,k)}b^{-1}\sum_{j=1}^{k}\psi(j)\cdot\rho\bigg(\frac{a}{b} + j\bigg) \bigg\}\cdot C_{\bar{\psi},\bar{\rho}}(a) \end{align*} $$
and
$$ \begin{align*} C_{\psi,\rho}(a) = \frac{L(1,\rho)\cdot L(1,\psi)}{L(2,\rho\cdot \psi)}\sum_{d|a}\psi(d)\cdot \rho(d)\cdot d^{-1}. \end{align*} $$
By setting
$\psi = \rho = \chi _{3}$
, Theorem 1.5 allows the study of the set
$S(\triangle , \triangle , a)$
in short intervals. However, this theorem cannot be employed to derive even a weaker version of Corollary 1.4. The obstacle is that the characters
$\chi _{4}$
and
$\chi _{3}$
(or
$\chi _{6}$
) cannot be used simultaneously in Theorem 1.5: they require a common modulus k (where
$12 \mid k$
), and lifting them to such a modulus destroys the primitivity in the theorem’s hypothesis.
For a positive integer q, set
Theorem 1.6. Let
$\psi $
be a real nontrivial character modulo
$b \geq 4$
, with b even. If
$a \neq 0$
is an integer, then
$$ \begin{align} \sum_{n \leq x,\, (n,b) = 1}F_{\psi}(n)\cdot F_{\chi_{4}}(n+a)= \beta(\psi,a)\cdot \eta^{*}(\psi,a)\cdot x+O(x^{5/6}\cdot\log^{19}x), \end{align} $$
where
$$ \begin{align*} \beta(\psi,a) = \sum_{d= 1}^{\infty}\frac{\psi(d)\cdot\eta_{a}(d)}{d^2}> 0 \quad\text{ and }\quad \eta^{*}(\psi,a) = \sum_{j=1, \, \psi(j-a) = 1}^{b}\frac{\pi \cdot \eta_{j}(b)}{2b^2}. \end{align*} $$
Theorem 1.6 implies Corollary 1.4. With
$\chi _{6}$
being the nontrivial real character modulo
$6$
, by Lemma 1.3 and (1.2),
$$ \begin{align*} \sum_{n\leq x, \, (n,6) = 1}R_{2}(n)\cdot r_{2}(n+a) & = 24\cdot\sum_{\substack{n\leq x, \, (n,6)=1\\ n \geq \max\{1,1-a\}}}F_{\chi_{3}}(n)\cdot F_{\chi_{4}}(n+a)\\ &=24\cdot\sum_{\substack{n\leq x, \, (n,6)=1\\ n \geq \max\{1,1-a\}}}F_{\chi_{6}}(n)\cdot F_{\chi_{4}}(n+a). \end{align*} $$
Thus,
$$ \begin{align*} \sum_{n\leq x, \, (n,6) = 1}R_{2}(n)r_{2}(n+a) = 24\cdot\beta(\chi_{6},a)\cdot \eta^{*}(\psi,a)\cdot x+O(x^{5/6}\cdot \log^{19} x). \end{align*} $$
The quantity
$\eta ^{*}(\chi _{6},a)$
takes values from the set
$\{\eta ^{*}(\chi _{6},0),\eta ^{*}(\chi _{6},1),\ldots ,\eta ^{*}(\chi _{6},5)\}$
and each such value is positive. Noting that
$\beta (\psi ,a)>0$
, as proved in Theorem 1.6, we conclude, by differencing the above asymptotic formula at suitable endpoints, that the remainder of the proof of Corollary 1.4 follows as in the deduction of Lemma 1.1.
When K is a quadratic number field with discriminant D, there exists a primitive character
$\chi _{K}$
modulo D so that the number of ideals of norm n is given by the expression
$F_{\chi _{K}}(n)$
[Reference Müller12]. Denote

Then, with Theorem 1.6, a result similar to Corollary 1.4 can be obtained for the set
. Deep results of Iwaniec [Reference Iwaniec9, Theorem 1] examine
$S(Q,\mathbb {P},a)$
, when Q is a set containing values assumed by a quadratic form and
$\mathbb {P}$
is the set of primes. Further, Moree and Riele [Reference Moree and te Riele11] compare the densities of
$\triangle $
and
. Let
$B_{j}(x)$
denote the number of integers v that satisfy
$v \leq x$
and v is represented by the quadratic form
$x^2 + j y^2$
. Then,
$B_{1}(x) \geq B_{3}(x)$
[Reference Moree and te Riele11, Theorem 1]. Similar to Lemma 1.2, which attempts to study the largest gaps between elements of
, we obtain a weaker gap result for sets of the form
.
Theorem 1.7. Let
$x \geq 1$
. There exists a constant
$D_{a}>0$
such that there is an element of
in the interval
$[x, x + D_{a}\cdot x^{\Upsilon (a)}]$
, where
$$ \begin{align*} \Upsilon(a) = \begin{cases} 1/2 & \text{ for } a \in \{n^2-3m^2: \ n,m \in \mathbb{Z}\},\\ 5/8 & \text{ for } a \in \mathbb{Z}\setminus\{n^2-3m^2: \ n,m \in \mathbb{Z}\}. \end{cases} \end{align*} $$
A generalisation of Theorem 1.7 can be obtained, but we do not pursue that here.
2 Notation
We adopt the usual notation:
$(u,v)$
denotes the greatest common divisor of the integers u and v; for a prime p and an integer w,
$\nu _{p}(w)$
is the largest integer t with
$p^{t} \mid w$
(defined to be
$\infty $
when
$w = 0$
);
$\phi (\cdot )$
is the Euler totient function and
$\zeta (\cdot )$
is the Riemann zeta function.
Let U, V and W be complex quantities dependent on parameters
$\mathbf {P}$
from some set, along with (possibly)
$d,q \in \mathbb {N}$
and
$x \in \mathbb {R}$
. Unless otherwise specified, we write
$U \ll V$
,
$V \gg U$
or
$U = O(V)$
if there exists an effective constant
$C> 0$
, independent of
$d,q$
and x, such that
$|U| \leq C\cdot V$
for all choices of
$d,q$
and x (with other variables fixed), whenever
$V \neq 0$
. Further, we write
$U = V+O(W)$
if
$U-V \ll W$
.
3 Proof of Theorem 1.6
We interpret a result of Tolev [Reference Tolev13, (10)]. Put
$$ \begin{align*} S_{q,a}(x) := \sum_{\substack{n \leq x \\ n \equiv a \pmod{q}}} F_{\chi_{4}}(n) =\pi\frac{\eta_{a}(q)}{4q^2}x + R_{q,a}(x). \end{align*} $$
Then,
With the notation
$F_{\psi }(\cdot ) = A(\cdot )$
and
$F_{\chi _{4}}(\cdot ) = B(\cdot )$
, the main expression we wish to evaluate asymptotically is
$$ \begin{align*} J(x) := \sum_{n \leq x, \ (n,b) = 1} A(n)\cdot B(n+a). \end{align*} $$
We need two lemmas.
Lemma 3.1. If
$\psi (n) = -1$
, then
$A(n)=0$
.
Proof. Observe that A is the convolution of
$\psi $
and
$1$
, and thus, is multiplicative. On primes p, with
$\psi (p) = -1$
, we have that
$A_{b}(p^j) = 0$
if j is an odd number. Hence, the lemma follows.
Extend the character
$\psi $
to the real numbers by setting
$\psi (w) = 0$
whenever
$w \not \in \mathbb {Z}$
. When
$\psi (n) = 1$
and
$d \mid n$
, we observe that
$\psi (n/d) = \psi (d)$
, and this symmetry leads to the following lemma.
Lemma 3.2. If
$\psi (n)= 1$
, then
$$ \begin{align*} A(n) = \bigg(2\sum_{d < \sqrt{n}}\psi(d)\bigg) +\psi(\sqrt{n}). \end{align*} $$
With Lemmas 3.1 and 3.2, we write
$$ \begin{align*} J(x) &= \sum_{n\leq x, \ \psi(n) = 1}A(n)\cdot B(n+a) = \sum_{n\leq x, \ \psi(n) = 1}\bigg(\!\sum_{d|n}\psi(d)\bigg)\cdot B(n+a)\\ &= \sum_{n\leq x, \ \psi(n) = 1}\bigg(2\cdot\bigg( \sum_{d|n, \ d<\sqrt{n}}\psi(d)\bigg) + \psi(\sqrt{n})\bigg)\cdot B(n+a)\\ &= \sum_{n\leq x, \ \psi(n) = 1}\bigg(2\cdot \sum_{d|n, \ d<\sqrt{n}}\psi(d) \bigg)B(n+a) + O(x^{1/2 + \varepsilon}). \end{align*} $$
This implies
$$ \begin{align*} J(x) = \sum_{1 \leq d < \sqrt{x}}2\psi(d)\bigg(\!\sum_{\substack{d^2 < n \leq x \\ \ d|n, \ \psi(n) = 1}}B(n+a)\bigg) + O(x^{1/2 + \varepsilon}). \end{align*} $$
For
$(b,d) = 1$
, let
$V(d)$
be the set of residue classes modulo
$bd$
so that if r is a congruence class modulo
$bd$
, then
$r \equiv a \pmod d$
and
$\psi (r-a) = 1$
. Note that
$V(d)$
has
$\phi (b)/2$
residue classes. List the residue classes as
$r(1,d), r(2,d),\ldots ,r(\phi (b)/2,d)$
. Then,
$$ \begin{align*} J(x) = \sum_{1 \leq d < \sqrt{x}}2\psi(d) \sum_{j=1}^{\phi(b)/2} \bigg(\!\sum_{\substack{m \equiv r(j,d) \pmod{bd}\\ d^2+a<m \leq x+a}} B(m)\bigg) + O(x^{1/2 + \varepsilon}). \end{align*} $$
Let
$$ \begin{align*} Q(j;x) = \sum_{\substack{m \equiv r(j,d) \pmod{bd} \\ d^2+a<m \leq x+a}} \hspace{-0.5cm}B(m). \end{align*} $$
By the bound (3.1),
Since
$a \neq 0$
, we have
$(r(j,d),bd) \leq |ab|$
and so
where the implied constant in the O-notation is independent of d in the range
${1 \leq d < \sqrt {x}}$
. Using
$\sum _{1\leq d < \sqrt {x}}\tau ^4(d) \ll \sqrt {x}\cdot \log ^{15}x$
[Reference Wilson14] (also see [Reference Luca and Tóth10]), we find
$$ \begin{align*} J(x) &= \bigg(\!\sum_{1 \leq d < \sqrt{x}}2\psi(d)\sum_{j=1}^{\phi(b)/2}\pi \frac{\eta_{r(j,d)}(bd)}{4b^2 d^2}(x-d^2)\bigg) + O(x^{5/6}\cdot\log^{19}x)\\ &= \frac{\pi}{2 b^2}\cdot\bigg(\!\sum_{1 \leq d < \sqrt{x}, \, (d,b)=1}\psi(d)\sum_{j=1}^{\phi(b)/2} \frac{\eta_{r(j,d)}(bd)}{d^2}(x-d^2)\bigg) + O(x^{5/6}\cdot\log^{19}x). \end{align*} $$
Since
$\eta _{s}(\cdot )$
is multiplicative for each
$s \in \mathbb {Z}$
,
$$ \begin{align*} J(x) =\frac{\pi}{2 b^2}\cdot\bigg(\!\sum_{1 \leq d < \sqrt{x}}\psi(d)\sum_{j=1, \, \psi(j-a) = 1}^{b} \frac{\eta_{j}(b)\eta_{a}(d)}{d^2}(x-d^2)\bigg) + O(x^{5/6}\cdot\log^{19}x). \end{align*} $$
Thus,
$$ \begin{align} J(x) = \frac{\pi}{2b^2}\cdot\bigg(\!\sum_{j=1, \, \psi(j-a) = 1}^{b}\eta_{j}(b)\sum_{1 \leq d < \sqrt{x}}\frac{\psi(d)\eta_{a}(d)}{d^2}(x-d^2)\bigg) + O(x^{5/6}\cdot\log^{19} x). \end{align} $$
3.1 Behaviour of
$\eta _{a}(d)$
Put
$\lambda _{a}(d):= \eta _{a}(d)/d$
. The next two lemmas follow from [Reference Blomer, Brüdern and Dietmann2, (2.22), (2.23) and (2.24)].
Lemma 3.3. If
$p \equiv 1 \pmod 4$
is a prime such that
$\nu _{p}(a)> 0$
, then
$$ \begin{align*} \lambda_{a}(p^{j}) = \begin{cases} 1 + j(1-{1}/{p}) & \text{for } 1 \leq j \leq \nu_{p}(a),\\ (1+\nu_{p}(a))(1-{1}/{p}) & \text{for } j \geq \nu_{p}(a)+1. \end{cases} \end{align*} $$
Lemma 3.4. If
$p \equiv 3 \pmod 4$
is a prime such that
$\nu _{p}(a)> 0$
, then
$$ \begin{align*} \lambda_{a}(p^{j}) = \begin{cases} 1/p & \text{for } 1 \leq j \leq \nu_{p}(a), \ j \text{ odd},\\ 1 & \text{for } 1 \leq j \leq \nu_{p}(a), \ j \text{ even},\\ 1+1/p &\text{for } j \geq \nu_{p}(a)+1, \ \nu_{p}(a) \text{ even},\\ 0 & \text{for } j \geq \nu_{p}(a)+1, \ \nu_{p}(a) \text{ odd}. \end{cases} \end{align*} $$
The next lemma follows from [Reference Blomer, Brüdern and Dietmann2, (2.20) and (2.21)].
Lemma 3.5. Let p be an odd prime such that
$p \nmid a$
. If j is a positive integer, then
Following the proof of [Reference Blomer, Brüdern and Dietmann2, Lemma 2.8], we also see that when
$j \geq 1$
,
Corollary 3.6. Let
$n \in {\mathbb N}$
. There exists a constant
$K_{a}> 0$
so that
$0\leq \lambda _{a}(n) \leq K_{a}$
.
Proof. The result follows by Lemmas 3.3, 3.4, the estimate (3.3) and noting that
$\lambda _{a}$
is a multiplicative function.
Let
$\lambda _{a}^{-1}$
be the convolution of
$\lambda _{a}$
with the Möbius function
$\mu $
, that is,
$\lambda _{a}^{-1} = \lambda _{a}*\mu $
. Note that
$$ \begin{align*} \lambda_{a}(n) = \sum_{d|n}\lambda_{a}^{-1}(d). \end{align*} $$
Lemma 3.7. We have
where
$|f_{\lambda _{a}}(z)| \leq C_{a}$
whenever z is an odd number and
$C_{a}>0$
is some positive constant.
Proof. Note that
$\lambda _{a}^{-1} = \lambda _{a}*\mu $
is a multiplicative function. If p is an odd prime divisor of a, then by Lemmas 3.3 and 3.4,
$\lambda _{a}^{-1}(p^{j}) = \lambda _{a}(p^{j}) - \lambda _{a}(p^{j-1}) = 0$
whenever
$j \geq \nu _{p}(a)+2$
. Put
$D_{a} := \max _{d|a^2}|\lambda _{a}^{-1}(d)|$
. Observe that if
$p \mid a$
, then
$\nu _{p}(z) \leq \nu _{p}(a) + 1$
or else
$\lambda _{a}^{-1}(z) = 0$
. If
$\lambda _{a}^{-1}(z) \neq 0$
, then
$\lambda _{a}^{-1}(z) = \lambda _{a}^{-1}(r)\lambda _{a}^{-1}(q)$
, where
$z = rq$
with
$r \mid a^2$
and
$(a,q) = 1$
, so that
If p is a prime such that
$(p,a) = 1$
, then from Lemma 3.5,
$\lambda _{a}^{-1}(p) = {-\chi _{4}(p)}/{p}$
and
$\lambda _{a}^{-1}(p^{j}) = 0$
for
$j \geq 2$
. By (3.4), we obtain the estimate
$$ \begin{align*} |\lambda_{a}^{-1}(z)| \leq D_{a}\dfrac{1}{q} \leq \frac{a^2D_{a}}{z}. \end{align*} $$
Hence,
$|f_{\lambda _{a}}(z)| \leq a^2 D_{a}$
when z is an odd positive number.
Recall that b is an even number. For a multiplicative character
$\rho _{b}$
modulo b, we put
Lemma 3.8. When
$\rho _{b}$
is a nontrivial multiplicative character,
$J(\rho _{b},b,a,x) \ll x \log x$
.
Proof. Let
$\alpha $
be an integer with
$1\leq \alpha \leq b$
and
$(\alpha ,b)=1$
. Define
$$ \begin{align*} I(\alpha,b,a,x) :=\sum_{\substack{n \leq x \\ n \equiv \alpha \pmod b}} \eta_{a}(n) = \sum_{\substack{n \leq x \\ n \equiv \alpha \pmod b}} n \lambda_{a}(n) = \sum_{\substack{n \leq x \\ n \equiv \alpha \pmod b}}n \sum_{d|n}\lambda_{a}^{-1}(d). \end{align*} $$
Using the notation and result of Lemma 3.7, we can continue the above equation as
$$ \begin{align} \sum_{\substack{n \leq x \\ n \equiv \alpha \pmod b}} \bigg( \sum_{md = n}m f_{\lambda_{a}}(d)\bigg) & = \sum_{d \leq x, \ (d,b) = 1}f_{\lambda_{a}}(d)\sum_{\substack{md \leq x \\ md \equiv \alpha \pmod b}} m\notag\\ & = \sum_{d \leq x, \ (d,b) = 1}f_{\lambda_{a}}(d)\bigg(\bigg(\!\sum_{\substack{md \leq x \\ md \equiv 0 \pmod b}} m\bigg) + O(x/d)\bigg)\notag\\ & =\bigg(\!\sum_{d \leq x, \ (d,b) = 1}f_{\lambda_{a}}(d)\sum_{\substack{m \leq x/d \\ m \equiv 0 \pmod b}} m \bigg) + O(x\log x). \end{align} $$
With the equation
$J(\rho _{b},b,a,x) = \sum _{\alpha = 1, \ (\alpha ,b) = 1}^{b}\rho _{b}(\alpha )\cdot I(\alpha ,b,a,x)$
and the vanishing of the character sum
$\sum _{\alpha = 1, \ (\alpha ,b) = 1}^{b}\rho _{b}(\alpha ) = 0$
, we have (with (3.5))
$$ \begin{align*} J(\rho_{b},b,a,x) & = \bigg(\!\sum_{\alpha = 1, \ (\alpha,b) = 1}^{b}\rho_{b}(\alpha)\bigg)\bigg(\bigg(\!\sum_{d \leq x, \ (d,b) = 1}f_{\lambda_{a}}(d)\sum_{\substack{m \leq x/d \\ \ m \equiv 0 \pmod b}} m\bigg)+O(x\log x) \bigg)\\[-3pt] &= O\bigg(\!\sum_{\alpha = 1, \ (\alpha,b) = 1}^{b}|\rho_{b}(\alpha)| x \log x\bigg) = O(bx\log x) = O(x\log x). \end{align*} $$
Here, we remark that the implicit constants are allowed to depend on b.
Define the function
$G(\rho _{b},b,a,s)$
of the complex variable s by
$$ \begin{align*} G(\rho_{b},b,a,s) = \sum_{n=1}^{\infty}\frac{\rho_{b}(n)\lambda_{a}(n)}{n^{s}}. \end{align*} $$
Corollary 3.9. For a nontrivial character
$\rho _{b}$
,
$G(\rho _{b},b,a,s)$
is analytic on
$\mathrm {Re}(s)> 0$
.
Proof. Let
$\delta>0$
be fixed. By Lemma 3.8 and summation by parts,
$$ \begin{align*} \sum_{n \leq x}\frac{\rho_{b}(n)\lambda_{a}(n)}{n^{\delta}} = \sum_{n \leq x}\rho_{b}(n)\eta_{a}(n)n^{-1-\delta} \ll 1. \end{align*} $$
In particular, by [Reference Apostol1, Theorem 11.8], the Dirichlet series
$G(\rho _{b},b,a,s)$
converges for
$\text {Re}(s)>0$
and, by [Reference Apostol1, Theorem 11.12], it is analytic in that domain.
We need to show that
$G(\rho _{b},b,a,1)$
does not vanish whenever
$\rho _{b}$
is a nontrivial character modulo b. With the help of Corollary 3.6, we see that for
$s>1$
,
$G(\rho _{b},b,a,s)$
has the Euler product
$$ \begin{align} G(\rho_{b},b,a,s) = \prod_{p \text{ an odd prime}}\bigg(1+\sum_{d=1}^{\infty}\frac{\rho_{b}(p^{d})\lambda_{a}(p^d)}{p^{ds}}\bigg). \end{align} $$
Put
$$ \begin{align*} G_{p}(\rho_{b},b,a,s) := 1+\sum_{d=1}^{\infty}\frac{\rho_{b}(p^{d})\lambda_{a}(p^d)}{p^{ds}}. \end{align*} $$
Lemma 3.10. When p is an odd prime and
$\rho _{b}$
is a multiplicative character modulo b, then
$G_{p}(\rho _{b},b,a,1) \neq 0$
. Furthermore, when
$s\geq 1$
and
$\rho _{b}$
is a real character, then
$G_{p}(\rho _{b},b,a,s)> 0$
.
Proof. Using Lemmas 3.3, 3.4 and 3.5, we bound
$$ \begin{align*} |G_{p}(\rho_{b},b,a,1)|&> 1 -\sum_{d=1}^{\infty}\frac{1+d(1-{1}/{p})}{p^d} \\ &= 1- \dfrac{1}{p-1} - \bigg(1-\dfrac{1}{p}\bigg)\dfrac{p}{(p-1)^2} = 1-\dfrac{2}{p-1}, \end{align*} $$
so that
$|G_{p}(\rho _{b},b,a,1)|>0$
for all odd primes. The proof for positivity of
$G_{p}(\rho _{b},b,a,s)$
(for real characters) on the region
$s\geq 1$
follows similarly.
Put
$$ \begin{align*} G_{p}^{*}(\rho_{b},b,a,s) := \sum_{d=2}^{\infty}\frac{\rho_{b}(p^{d})\lambda_{a}(p^d)}{p^{ds}}. \end{align*} $$
Using Lemmas 3.3, 3.4 and 3.5, for
$s>1$
,
$$ \begin{align} |G^{*}_{p}(\rho_{b},b,a,s)| < \sum_{d=2}^{\infty}\frac{d(1-{1}/{p})}{p^{ds}} \leq \dfrac{8}{p^2}. \end{align} $$
Let
$\chi _{0}$
be the trivial character modulo b. Using Lemmas 3.3, 3.4 and 3.5, we see that
$G(\chi _{0},b,a,s)$
is analytic on
$\text {Re}(s)> 1$
.
Lemma 3.11. If
$s>1$
, then
$0<G(\chi _{0},b,a,s) \leq K_{a}\cdot \zeta (s)$
for some constant
$K_{a}>0$
.
Proof. From Corollary 3.6,
$0\leq \lambda _{a}(n) \leq K_{a}$
. We now write
$$ \begin{align*} G(\chi_{0},b,a,s) = \sum_{n=1}^{\infty}\frac{\chi_{0}(n)\lambda_{a}(n)}{n^{s}} \leq K_{a}\cdot\zeta(s). \end{align*} $$
Clearly,
$G(\chi _{0},b,a,s)$
is positive whenever
$s>1$
.
Put
$$ \begin{align*} H(b,a,s) := \prod_{\rho_{b} \pmod b}G(\rho_{b},b,a,s), \end{align*} $$
where the product is taken over all characters modulo b. Note that
$H(b,a,s)$
is analytic for
$\text {Re}(s)>1$
.
Lemma 3.12. We have
$\lim _{s\to 1^+} |H(b,a,s)| = \infty $
.
Proof. Let
$$ \begin{align*} H_{p}(b,a,s) := \prod_{\rho_{b}\pmod b}G_{p}(\rho_{b},b,a,s). \end{align*} $$
When
$s>0$
is real, then
$H_{p}(b,a,s)$
is real-valued. We expand
$H_{p}(b,a,s)$
as
$$ \begin{align} H_{p}(b,a,s) &= \prod_{\rho_{b}\pmod b}\bigg(1+\dfrac{\rho_{b}(p)\lambda_{a}(p)}{p^s} +G_{p}^{*}(\rho_{b},b,a,s)\bigg)\notag\\ &= 1 +\frac{\theta_{b}(p)\lambda_{a}(p)}{p^s} + H^{*}_{p}(b,a,s), \end{align} $$
where
$\theta _{b}(p) = b$
if
$p \equiv 1 \pmod b$
and
$0$
otherwise. By (3.7),
$H^{*}_{p}(b,a,s)$
is real-valued for
$s> 1$
and satisfies
$$ \begin{align} H^{*}_{p}(b,a,s) \leq \frac{Q_{b}}{p^2} \end{align} $$
for some constant
$Q_{b}>0$
. Using Lemma 3.10, we see that
$H_{p}(b,a,1) \neq 0$
. Using Corollary 3.6, we can find a positive number
$T_{b} \geq 3$
such that
$$ \begin{align*} \bigg|\frac{\theta_{b}(p)\lambda_{a}(p)}{p^s} + \frac{Q_{b}}{p^2}\bigg| \leq \dfrac{1}{2}, \end{align*} $$
whenever
$p> T_{b}$
. We will make use of the following elementary inequality:
We now write
$$ \begin{align} H(b,a,s) = \prod_{p \leq T_{b}}H_{p}(b,a,s) \prod_{p> T_{b}}H_{p}(b,a,s), \end{align} $$
where, by Lemma 3.10,
$$ \begin{align} \prod_{p \leq T_{b}}H_{p}(b,a,1) \neq 0. \end{align} $$
For
$s> 1$
, by (3.8), (3.9), (3.10), Lemma 3.5 and Corollary 3.6,
$$ \begin{align*} &\log\bigg(\prod_{p> T_{b}}H_{p}(b,a,s)\bigg) = \sum_{p > T_{b}}\log\bigg(1 +\frac{\theta_{b}(p)\lambda_{a}(p)}{p^s} + H^{*}_{p}(b,a,s)\bigg)\\ &\quad\geq \sum_{p > T_{b}} \frac{\theta_{b}(p)\lambda_{a}(p)}{p^s}+ H^{*}_{p}(b,a,s)-2\bigg(\frac{\theta_{b}(p)\lambda_{a}(p)}{p^s} + H^{*}_{p}(b,a,s)\bigg)^2\\ &\quad\geq \bigg(\!\sum_{\substack{p > T_{b} \\ p \equiv 1 \pmod{b} \\ p \nmid b}} \frac{b(1 - p^{-1})}{p^{s}}\bigg) - \sum_{p > T_{b}}\bigg(\frac{Q_{b}}{p^2}+2\bigg(\frac{b K_{a}}{p^s}+\frac{Q_{b}}{p^2}\bigg)^2\bigg). \end{align*} $$
Since
$\sum _{p \equiv 1 \pmod b} {1}/{p} = \infty $
and
$\sum _{p \equiv 1 \pmod b} {1}/{p^2} < \infty $
,
$$ \begin{align} \lim_{s \to 1^{+}}\prod_{p> T_{b}}H_{p}(b,a,s) = \infty. \end{align} $$
Lemma 3.13. We have
$G(\rho _{b},b,a,1) \neq 0.$
Proof. It is clear that
$G(\chi _{0},b,a,1) = \infty $
. Now, assume that
$\rho _{b} \neq \chi _{0}$
. Suppose for the sake of contradiction that
$G(\rho _{b},b,a,1) = 0$
. Since
$\zeta (s)$
has a simple pole at
$s = 1$
, Lemmas 3.11 and 3.9 imply that
$H(b,a,s)$
is bounded near
$s=1$
. However, this contradicts Lemma 3.12.
Recall
$$ \begin{align} \beta(\psi,a) = \sum_{d= 1}^{\infty}\psi(d)\frac{\eta_{a}(d)}{d^2} = \sum_{d= 1}^{\infty}\psi(d)\frac{\lambda_{a}(d)}{d} = G(\psi,b,a,1) , \end{align} $$
so that by Lemma 3.13, it is necessary that
From (3.6), on the ray
$s>1$
,
$$ \begin{align*} G(\psi,b,a,s) = \prod_{p \text{ an odd prime}}\bigg(1+\sum_{d=1}^{\infty}\frac{\psi(p^{d})\lambda_{a}(p^d)}{p^{ds}}\bigg) = \prod_{p \text{ an odd prime}}G_{p}(\psi,b,a,s) \end{align*} $$
and, from Lemma 3.10, each entry in this infinite product is positive. Hence,
$G(\psi ,b,a,s)\geq 0$
when
$s> 1$
. By Corollary 3.9,
$G(\psi ,b,a,1) \geq 0$
and, by (3.14) and (3.15), we have
$\beta (\psi ,a)>0$
.
We now use these results in (3.2) to obtain an asymptotic formula. By Lemma 3.8,
$$ \begin{align*} J(x) &= \sum_{j=1, \, \psi(j-a) = 1}^{b}\frac{\pi\cdot \eta_{j}(b)}{2b^2}\sum_{1 \leq d < \sqrt{x}}\frac{\psi(d)\eta_{a}(d)}{d^2}(x-d^2) + O(x^{5/6}\cdot\log^{19}x)\\ &= \sum_{j=1, \, \psi(j-a) = 1}^{b}\frac{\pi\cdot \eta_{j}(b)}{2b^2}\sum_{1 \leq d < \sqrt{x}}\frac{\psi(d)\eta_{a}(d)}{d^2}(x)+O(x^{5/6}\cdot\log^{19}x). \end{align*} $$
From Lemma 3.8 and summation by parts,
$\sum _{d \geq \sqrt {x}}{\psi (d)\eta _{a}(d)}/{d^2} \ll x^{-1/2+\varepsilon }$
. Thus,
$$ \begin{align*} J(x) = \bigg(\beta(\psi,a)\sum_{j=1, \, \psi(j-a) = 1}^{b}\frac{\pi \eta_{j}(b)}{2b^2}\bigg)\ x + O(x^{5/6}\cdot\log^{19}x), \end{align*} $$
which finishes the proof.
4 Proof of Theorem 1.7
Suppose that
$a = n^2 - 3m^2$
for some integers n and m. Under this assumption, for each integer s, we have
$s^2 +3m^2 \in \triangle $
and
. Hence, Theorem 1.7 holds in this case.
Moving to the more nontrivial situation, we choose integers
$l_{1},l_{2}\in \{0,1\}$
so that
$l_{1}^2 - 3l_{2}^2 - a \equiv 1 \pmod 2$
, and require integers v and d to satisfy
$v \equiv l_{1} \pmod 2$
and
$d \equiv l_{2} \pmod 2$
. If
$(c,d,u,v)$
is an integer solution to
then
$(c+u)(c-u) = v^2-3d^2-a$
, so that there exists a divisor
$g \mid (v^2-3d^2-a)$
and a simultaneous system of equations satisfying
$$ \begin{align*} c+u = g, \quad c-u = \frac{v^2-3d^2-a}{g}. \end{align*} $$
Thus, the solutions
$(c,d,u,v)$
to (4.1) come from the set
$$ \begin{align*} \bigg\{\bigg(\dfrac{1}{2}\bigg(g+\frac{v^2-3d^2-a}{g}\bigg), d, \dfrac{1}{2}\bigg(g-\frac{v^2-3d^2-a}{g}\bigg), v\bigg) : g,v,d \in \mathbb{Z}, \ g \neq 0\bigg\}. \end{align*} $$
At
$g = 1$
, we obtain a subfamily of solutions to (4.1) given by
Consequently,
Let
be a complex valued function. Let
$q(x)$
be the largest real number such that
${f(0,q(x)) = x}$
(which exists for sufficiently large x). Observe that
Define
$Q(x)$
to be the smallest integer d,
$d \equiv l_{2} \pmod 2$
, such that
$f(0,d)> x$
and
${d \geq q(x)}$
. Note that
$q(x)\leq Q(x) \leq q(x)+2$
for sufficiently large x. Setting
$Q^{*}(x) = Q(x)+2$
, we deduce that
Put
$E(x) = f(0,Q^{*}(x)) - x$
. Differentiating
$r(y) := f(0,y)$
as a function of y gives
Hence, writing
$E(x)=f(0,Q^{*}(x)) - x$
as
$r(Q^{*}(x)) - r(q(x))$
, and applying the mean value theorem (together with (4.3) and
$2\leq Q^{*}(x) - q(x) \leq 4$
) yields
so that for sufficiently large x,
For a given
$x \geq 1$
, let
$$ \begin{align*} g_{x}(w) &:= \bigg(w+\frac{-3\cdot Q^{*}(x)^2-a+1}{2}\bigg)^2 +3\cdot Q^{*}(x)^2\\ &\; = w^2 -(-3\cdot Q^{*}(x)^2-a+1)w + f(0,Q^{*}(x)), \end{align*} $$
so that
$g_{x}({v^2}/{2}) = f(v,Q^{*}(x))$
. Now, solve the equation
$g_{x}(w) = x$
for
$w \in \mathbb {C}$
giving the solutions
$$ \begin{align*} w = \frac{3\cdot Q^{*}(x)^2-a+1 \pm \sqrt{(3\cdot Q^{*}(x)^2-a+1)^2 - 4(f(0,Q^{*}(x))-x)}}{2}. \end{align*} $$
For x sufficiently large so as to satisfy (4.6) and
$3\cdot Q^{*}(x)^2-a+1 \geq 1$
(the second inequality holds for large x because of (4.4)), let
$$ \begin{align*} w_{*}(x) = \frac{3\cdot Q^{*}(x)^2-a+1 - \sqrt{(3\cdot Q^{*}(x)^2-a+1)^2 - 4\cdot E(x)}}{2}. \end{align*} $$
Then,
We now write
$$ \begin{align*} w_{*}(x) = \dfrac{1}{2}\cdot\frac{4\cdot E(x)}{3\cdot Q^{*}(x)^2-a+1+\sqrt{(3\cdot Q^{*}(x)^2-a+1)^2 - 4\cdot E(x)}}. \end{align*} $$
By (4.4) and (4.5), we have
$x^{1/4}\ll w_{*}(x) \ll x^{1/4}$
and
For x large so that
$\sqrt {2w_{*}(x)} \geq 3$
, let
$v_{*}(x)$
be the largest number less than
$\sqrt {2w_{*}(x)}$
that satisfies
$v_{*}(x) \equiv l_{1} \,\mod 2$
. From (4.7),
By the element-set relation (4.2),
It remains to show that the quantity mentioned above is sufficiently close to x. Let
$h_{x}(y) := f(y,Q^{*}(x))$
be a function in the variable
$y \in \mathbb {R}$
.
Lemma 4.1. For sufficiently large x,
$h_{x}(\cdot )$
is decreasing on the interval
$[0,Q^{*}(x))$
.
Proof. Differentiating
$h_{x}(y)$
in the variable y,
which is less than
$0$
when
$y \in [0,Q^{*}(x))$
, provided x is sufficiently large.
For x sufficiently large,
Furthermore, by the mean value theorem,
$$ \begin{align} \bigg|\bigg(\bigg(\frac{v_{*}(x)^2-3\cdot Q^{*}(x)^2-a+1}{2}\bigg)^2 +3\cdot Q^{*}(x)^2\bigg) - x\bigg| &= |h_{x}(v_{*}(x)) - h_{x}(\sqrt{2w_{*}(x)})| \notag\\ &=|h_{x}'(z(x))|(\sqrt{2w_{*}(x)} - v_{*}(x) ), \end{align} $$
where
$z(x)$
is a quantity in the interval
$[v_{*}(x), \sqrt {2w_{*}(x)}]$
. With (4.12), (4.10), (4.4), (4.8) and the inequality
$|v_{*}(x) - \sqrt {2w_{*}(x)}| \leq 2$
, we obtain
$$ \begin{align} \bigg|\bigg(\bigg(\frac{v_{*}(x)^2-3\cdot Q^{*}(x)^2-a+1}{2}\bigg)^2 +3\cdot Q^{*}(x)^2\bigg) - x\bigg| \ll x^{5/8}. \end{align} $$
The theorem follows from (4.13), (4.11) and the element-set relation (4.9).
Acknowledgements
The author would like to thank Fernando Chamizo for highlighting difficulties using spectral theory to study the sum (1.3). Should these ideas advance to understand the interplay between distinct quadratic forms, the main result of this paper should be obsolete. The author would also like to thank Igor Shparlinski for his comments.
This research is made possible due to the Australian Government Research Training Program (RTP) Scholarship and the University of New South Wales for a top-up scholarship, both of which were instrumental in this work.


denote the numbers represented as a sum of two squares. For a nonzero integer
be the set of integers 
. We conduct a census of
in short intervals by showing that there exists a constant 
