1. Introduction
1·1 Quadratic forms and theta series
A positive integral $m{\times}m$ matrix Q with even diagonal entries gives rise to a quadratic form $q(x)= x^T Q x/2$ . It is one of the classical tasks of number theory to study which numbers n are represented by q or more precisely to count the number of solutions
Naturally, a necessary condition for $r(Q,n) \ge 1$ is that n is locally represented by q meaning that for every prime p there exists a p-adic solution $x_p \in ({\mathbb Z}_p)^m$ of ${n= q(x_p)}$ . By applying the Hardy–Littlewood method, Tartakowski [Reference Tartakowsky28] showed in 1929 that for $m \geq 5$ every locally represented, sufficiently large n satisfies ${r(Q,n) \ge 1}$ . Furthermore, he extended this result to $m=4$ by assuming that n is primitively locally represented which means that for every prime there is a local solution $x_p$ such that at least one entry of $x_p$ is a unit in ${\mathbb Z}_p$ .
To apply this result in practice, one needs an effective version stating how large n has to be with respect to Q. For $m \ge 5$ various effective bounds were obtained by analytical methods, see for example Watson [Reference Watson31], Hsia and Icaza [Reference Hsia and Icaza16] and Browning and Dietmann [Reference Browning and Dietmann6] and the references therein. However, these methods fail to provide satisfying results for $m=4$ or $m=3$ , and one employs the theory of modular forms and theta series instead, as done by Blomer [Reference Blomer1], Duke [Reference Duke11], Hanke [Reference Hanke15], Rouse [Reference Rouse23] or Schulze–Pillot [Reference Schulze–Pillot25].
To follow this latter approach, one considers
which is a modular form of weight ${m}/{2}$ with respect to
where N is the level of Q, i.e. the smallest integer such that $NQ^{-1}$ is integral with even diagonal entries, and $\chi$ is a quadratic character modulo N. The idea is to approximate $\theta(Q,z)$ by a weighted average over the classes in the genus of Q. The resulting form $\theta(\textrm{gen}\ Q,n)$ is an Eisenstein series and its Fourier coefficients can be explicitly computed by
where
The p-adic densities $\beta_p(n,Q)$ contain information from the local restrictions. For $m \geq 4$ and n primitively locally represented one can show that they satisfy ${\prod_p \beta_p(n,Q) \gg (n,N)^{-\delta} (nN)^{-{\epsilon}}}$ , where ${\delta = 1/{2}}$ for $m=4$ and $\delta =1 $ for $m \ge 5$ , cf. Lemma 8.
The difference $f(z) = \theta(Q,z)- \theta(\textrm{gen}\ Q,z)= \sum_n a(n)e(nz)$ is a cusp form. To obtain an uniform upper bound for a(n), we apply the Petersson formula and proceed as in [Reference Iwaniec and Kowalski18, corollary 14·24]. This estimate also works for half-integral weights, cf. [Reference Iwaniec17, p. 389], with the only difference that we apply [Reference Waibel30, lemma 4] to bound the twisted Kloosterman sums. As a consequence, we obtain for $m \geq 4$ that
where the norm is induced by the inner product
The case $m=3$ is more fragile due to the existence of certain cusp forms, so called theta functions, whose non-vanishing Fourier coefficients are of the same size as $r(\textrm{gen}\ Q,n)$ . To circumvent this problem, one approximates $\theta(Q,z)$ by another Eisenstein series $\theta(\textrm{spin}\ Q,n)$ given as a weighted average over the classes in the spinor genus of Q. Then, the Fourier coefficients of $\theta(Q,z) - \theta(\textrm{spin}\ Q,n)$ can be estimated by a method of Duke and Iwaniec, which involves the Shimura lift, the Kuznetsov formula and an elaborate estimate for sums over Kloosterman sums. To apply the resulting bound, [Reference Waibel30, theorem 1], one employs a local argument by Blomer [Reference Blomer2, (1·7)] which shows that it is sufficient to bound $r(Q,n) - r(Q',n)$ for Q, Q $^{\prime}$ in the same spinor genus and (n, N) small. In many cases, $r(\textrm{gen}\ Q,n)$ and $r(\textrm{spn}\ Q,n)$ coincide, and one obtains an asymptotic formula for r(Q, n).
1·2 Bounds for norms of theta series
The aim of this paper is to give strong uniform bounds for the inner products of
where Q, Q $^{\prime}$ are in the same genus. By definition of $\theta(\textrm{gen}\ Q,z)$ any bound for $\langle g,g \rangle$ is automatically a bound for $\langle \,f,f \rangle$ . Furthermore, we assume that Q is primitive meaning that the common divisor of all entries is 1.
The first bounds for $\langle \,f,f \rangle$ were only established in the 1990’s by Fomenko [Reference Fomenko12] and Schulze–Pillot [Reference Schulze–Pillot25] for $m=4$ . Stronger and more general estimates were proven by Blomer in his articles about ternary quadratic forms, [Reference Blomer1] and [Reference Blomer2]. There, he shows for $m = 3$ that
where the latter bound is only valid for diagonal Q with smallest entry a. For $m \ge 4$ , Blomer obtains in the appendix of [Reference Sardari24] that
In the special case that $\det Q$ is a fundamental discriminant, Rouse [Reference Rouse22] shows for quaternary forms that $\langle \,f,f \rangle \asymp N$ if $\min(NQ^{-1}) \ll 1$ , where $\min Q $ denotes the smallest integer represented by $q(x) = x^T Qx/2$ .
To state our results, we introduce further notation. For odd p, the form q(x) is equivalent over ${\mathbb Z}_p$ to
and over ${\mathbb Z}_2$ to
where $u_i \in ({\mathbb Z}_2)^{\times}$ , $0 \le 2r_1 \le 2 r_2\le m$ and $\nu_i(2) \geq 1$ , cf. [Reference Jones19, theorem 33]. We set $\nu_{2j}(2) = \nu_{2j-1}(2) \,{:\!=}\, \tilde{\nu}_j$ for $j \leq r_2$ and define $v_p(j) = \# \{1 \leq i \le m \mid \nu_i(p) \ge j\}$ . Moreover, for $s \geq 1$ , we set
Note that F(Q, s) is growing in s and $N/2 \leq F(Q,s) \leq F(Q,m) = \det Q$ . If most entries are coprime, then F(Q, s) is simply the determinant. For example, a diagonal form satisfies $F(Q,s) = \det Q$ if the common divisor of any $\lfloor s \rfloor +1$ diagonal terms is 1.
Theorem 1. Let Q correspond to a primitive, integral, positive quadratic form of level N in m variables and $f(z)=\theta(Q,z) - \theta(\mathrm{gen}\ Q,z)$ . Then,
These bounds also hold for $\langle g,g \rangle$ and $g(z)= \theta(Q,z)-\theta(Q',z)$ provided that Q $^{\prime}$ lies in the same genus as Q.
This is a significant improvement over previous results. For example, if $m\geq 4$ and $\det Q \asymp N$ , we obtain $\langle \,f,f \rangle \ll N^{\frac{m}{2}-1}$ instead of $\langle \,f,f \rangle \ll N^{m-2}$ in [Reference Sardari24]. This saving even increases if the determinant is larger than the level.
In applications, one often encounters special types of quadratic forms. A typical example are diagonal forms:
Theorem 2. Let Q, N, f be as in the previous theorem. In addition, we assume that Q is diagonal with entries $a_1 \le \cdots \le a_m$ and $m \geq 3$ . Then,
Here, $F(Q,{m}/{2}) \asymp \det Q$ if $(a_{\pi(1)},\ldots,a_{\pi(j)}) \ll 1$ for every $\pi \in S_m$ and $j \,{:\!=}\, \lfloor{m}/{2} \rfloor +1$ . We also provide a lower bound:
Theorem 3. Let Q, n, f be defined as in Theorem 1 and $M = \min_{x \in {\mathbb Z}^m} x^T N Q^{-1}x/2$ . Then, it holds for $m \geq 3$ that
This shows that, without further assumptions, our analysis is sharp. Indeed, for $q(x) = x_1^2 + \cdots + x_{m-1}^2 + N x_m^2$ upper and lower bounds in Theorem 2 and 3 only differ by an $N^{\epsilon}$ factor. For the minimum M of $NQ^{-1}$ Hermite’s theorem states that $M \ll N (\det Q)^{-\frac{1}{m}}$ , which yields that $\langle \,f,f \rangle \gg N (\det Q)^{-\frac{1}{2}-\frac{1}{m}} + \mathcal{O}(N^{\epsilon})$ .
One of the key ingredients for the proofs of Theorem 1 and 2 is Lemma 9 which states
for a quadratic form $\tilde{Q}$ and any $x \in {\mathbb N}$ . Here, $a_i$ are the successive minima of $\tilde{Q}$ , which are ordered by size and satisfy $a_1 \cdots a_m = \det \tilde{Q}$ . The novelty here is to show that these $a_i$ are bounded (up to a constant) by the level of $\tilde{Q}$ . This allows a much better treatment of the middle terms. For example, let $x=N$ , $\tilde{Q} = NQ^{-1}$ and consider
Previous works, such as [Reference Sardari24], simply estimated this term by $N^{m-2}$ . Together with an explicit transformation formual for the theta series, cf. Lemma 12, this gives the huge saving in Theorem 1 and 2.
The principal use of Theorem 1 and 2 is to improve the error $|r(Q,n) - r(\textrm{gen}\ Q,n)|$ . For the corresponding results and effective lower bounds for Tartakovski’s theorem with respect to Q, we refer the reader to Lemma 13 and 14.
1·3 Applications
By Gauss and Siegel it is known that every positive integer $n \not \equiv 0,4,7 \,(\textrm{mod}\ 8)$ can be expressed as a sum of three squares $n=x_1^2 + x_2^2 + x_3^2$ in $n^{\frac{1}{2}+o(1)}$ ways. Therefore, one would expect that we can still represent n if we restrict $x_j$ to a plausible subset of the integers and there is no obvious local obstruction. A famous conjecture in this regard is that every
can be represented as the sum of three squares of primes. Current technology is not sufficient to prove this; however, using a vector sieve, Blomer and Brüdern [Reference Blomer and Brüdern3] obtain similar findings for almost primes. The principal input for this sieve is a uniform bound for $ r(Q,n) - r(\textrm{gen}\ Q,n)$ , where $q(x)= x^T Q x/2 = l_1^2 x_1^2 + l_2^2 x_2^2 + l_3^2 x_3^2$ .
By this approach, they show that every n satisfying (7) is represented by
where $P_r$ denotes all integers with at most r prime factors. Subsequently, Lü [Reference Lü20] and Cai [Reference Cai7] optimised the sieving process by including weights and Blomer [Reference Blomer2] improved his estimates for Fourier coefficients of the cuspidal part of the theta series. Taken together, this allows to choose $x_j \in P_{106}$ and $x_1 x_2 x_3 \in P_{304}$ . By Theorem 1 and a small modification of Lü’s approach, we obtain:
Corollary 4. Every sufficiently large n with $n \equiv 3 \,(\mathrm{mod}\ 24)$ and $5 \nmid n$ can be represented in the form $n=x_1^2 + x_2^2 + x_3^2$ for integers $x_1,x_2,x_3$ with $x_1 x_2 x_3 \in P_{72}$ .
The dual problem is to represent an integer by squares of smooth numbers. For three variables, this is a hard task and only a small saving is possible. An application of Theorem 2 yields:
Corollary 5. For sufficiently large $n \not\equiv 0,4,7\,(\mathrm{mod}\ 8)$ , there is a solution of ${n= x_1^2 + \cdots + x_m^2}$ with $x_1,\ldots,x_m \in {\mathbb Z}$ such that every prime divisor $p \mid x_1\cdots x_m$ satisfies
These are slight improvements of [Reference Blomer, Brüdern and Dietmann4, Theorems 2 and 3], where $\eta = {73}/{74}$ and $\theta\,{=}\,365/592$ .
Notation and conventions. We use the usual $\epsilon$ -convention and all implied constants may depend on $\epsilon$ . Furthermore, we assume that all quadratic forms have finite rank. By $[.,.], (.,.)$ we refer to the least common multiple respectively the greatest common divisor of two integers. If $p^r \mid N$ , but $p^{r+1} \nmid N$ , we write $p^{r} \mid\!\mid N$ .
2. Siegel’s theory and local densities
For a holomorphic function f on the upper half plane and $\gamma \in \Gamma_0(N)$ we write
where $\big({c}/{d}\big)$ is the extended Kronecker symbol and ${\epsilon}_d = \left({-1}/{d}\right)^\frac{1}{2}$ . Moreover, we denote by $S_{m/2}(N,\chi)$ the space of cusp forms of weight $\frac{m}{2} $ for $\Gamma_0(N)$ and character $\chi$ .
Two positive, quadratic forms Q, Q $^{\prime}$ belong to the same class if $Q' = U^T Q U$ for $U \in \textrm{GL}_m({\mathbb Z})$ . Furthermore, they are in the same genus if they are equivalent over ${\mathbb Z}_p$ for all p, so in particular over ${\mathbb Q}$ . There are only finitely many classes in the genus and the set of automorphs $o(Q) \,{:\!=}\,\{ U \in \textrm{GL}_2({\mathbb Z}) \mid U^T Q U = Q\}$ is finite. We put
Throughout this work, we assume that $q(x) = x^T Qx/2$ is primitive. This implies that $NQ^{-1}$ has level N and that $N/2 \mid \det Q \mid 2 N^{m-1}.$
Recall that $\theta(Q,z) - \theta(\textrm{gen}\ Q,z) \in S_{m/2}(N,\chi)$ . The space $S_{3/2}(N,\chi)$ contains a subspace U generated by theta functions of the form $\sum \psi(n) n e(tn^2z)$ for some real character $\psi$ and $t \mid 4N$ . Their non-vanishing Fourier coefficients are of size $\asymp n^\frac{1}{2}$ which is the order of magnitude of $r(\textrm{gen}\ Q,z)$ , cf. (1). Hence, for $m=3$ the main term needs to be modified.
Two quadratic forms $q_1,q_2$ with matrices $Q_1 = S^T Q_2 S$ and $S \in \textrm{GL}_m({\mathbb Z})$ in the same genus belong to the same spinor genus if $S \in O_{Q}(A_2) \bigcap_{p} O'_{Q_p}(A_2)GL_{m}({\mathbb Z}_p)$ , where $O'_{Q_p}(A)$ is the subgroup of p-adic automorphs $O_{Q_p}(A)$ of determinant and spinor norm 1, cf. [Reference O’Meara21, section 55]. We set
Then, $\theta(Q,z) - \theta(\textrm{spn}\ Q,z) \in U^{\bot} \subseteq S_{3/2}(N,\chi)$ . For $g(z) = \sum_n b(n) e(nz) \in U^\bot $ , we have by [Reference Waibel30, theorem 1] for $n=tv^2w^2$ with squarefree t and $(w,N)=1$ that
This saving in n is sufficient to obtain an asymptotic formula for r(Q, n), since by a local argument of Blomer, cf. [Reference Blomer2, (1·7)], we can assume that (n, N) is small.
In principle, the Fourier coefficients $ r (\textrm{spn}\ Q,n)$ of $\theta(\textrm{spn}\ Q,z)$ can be computed locally in a similar fashion as $r(\textrm{gen}\ Q,n)$ . However, this process is complicated and tedious. Luckily, in many situations $r (\textrm{spn}\ Q,n)$ and r(Q, n) coincide. For example, this holds if
To obtain upper and lower bounds for $r(\textrm{gen}\ Q,n)$ , we need to evaluate the p-adic densities given in (2). If $p \nmid 2nN$ , an easy computation shows that
cf. [Reference Siegel27, Hilfssatz 12]. For $p \nmid 2N$ , we have by [Reference Siegel27, Hilfssatz 16] that
where $r= {m}/{2}$ for even m and $r= {1-m}/{2}$ for odd m. For the remaining p-adic densities, we apply a formula of Yang [Reference Yang32]. For odd p and $\nu_i, u_i$ defined as in (4), we set
and
Lemma 6. [Reference Yang32, theorem 3·1] For odd p and $n= p^a t$ with $(t,p)=1$ we have that
where
To compute the densities for odd $p \mid N, p\nmid n$ , we make a case distinction according to $V(1) = \#\{i \mid \nu_i =0 \}$ . If $V(2) \geq 2$ it follows by the theorem above that
For $V(1) =1$ , we obtain $\beta_p(Q,n) = 1 + \Big( {n}/{p} \Big) \prod_{i \in V(1)} \Big({u_i}/{p} \Big)$ .
For the computation of the 2-adic densities Yang provides a slightly more complex formula [Reference Yang32, theorem 4·1]. This gives the following upper bound:
Corollary 7. It holds that
Proof. By (10), (11) and (13) we already know that
Let $(n,N) = p^b$ . Then, $d(l) \leq {b}/{2}$ for all l. Hence, Lemma 6 gives for odd p that $\beta_p(Q,n) \ll p^{\frac{b}{2}}$ as $|{v(l)}|=1$ . For $p=2$ we apply [Reference Yang32, theorem 4·1]. The term d(k), defined in [Reference Yang32, (4·3)], satisfies $d(k) \leq 2^{\frac{b+1}{2}}$ which implies that [Reference Yang32, (4·4)] is bounded by $\ll 2^{\frac{b}{2}}$ and hence, also $\beta_2(n,Q)$ .
As a consequence, we obtain by (1) that
To obtain lower bounds for $\beta_p(Q,n)$ we follow the approach of Hanke [Reference Hanke15]. For $q \simeq u_1 p^{\nu_1} x_1^2 + \cdots + u_m p^{\nu_m} x_m^2 $ in the form (4) and a primitive solution $x \in ({\mathbb Z}_p)^m$ of $q(x) = n$ , we set
We say that x is of good type if $\nu(x)=0$ , of bad type I if $\nu(x)=1$ and of bad type II if $\nu(x) \ge 2$ . If there is a solution of good type, we count solutions modulo p and apply Hensel’s lemma to compute $\beta_p(q,n)$ . As a result, we obtain $\beta_p(q,n) \geq 1- {1}/{p}$ and $\beta_2(q,n) \geq {1}/{4}$ .
In all other cases, we apply reduction maps. Therefore, let $q \equiv q_0 + p q_1 + p^2 q_2$ , where $q_0$ consist of all diagonal terms with $\nu_i=0$ and $pq_1$ of those with $\nu_i=1$ . If there are no good solutions, but at least one of bad type I, we reduce modulo p which gives $\beta_p(q,n) \geq p^{1-\dim q_0} \beta_p(q',{n}/{p})$ for $q' = p q_0 + q_1 + p q_2$ . If there are only bad type II solutions, we reduce modulo $p^2$ which gives $\beta_p(q,n) \geq p^{2-\dim q_0-\dim q_1} \beta_p(q'',{n}/{p^2})$ for $q'' = q_0 + p q_1 + q_2$ . As a consequence, we obtain:
Lemma 8. Assume there is a primitive solution $q(x) = n$ over ${\mathbb Z}_p$ with $\nu \,{:\!=}\, \nu(x)$ as above and $m \geq 4$ . Then,
Furthermore, we have for $m=4$ that
and for $m \geq 5$ that
Remark. It seems counterintuitive that the bounds for $m=4$ are stronger. One reason is the assumption that n is primitively locally represented which eliminates the worst case scenario for the lower bound, i.e. that $q \sim x_1^2 + x_2^2 + p x_3^2 + p x_4^2$ and $p \equiv 3 \,(\textrm{mod}\ 4)$ .
Proof. The case $m=4$ is essentially proven in [Reference Rouse23, lemma 2]. If $p \equiv 1\, (\textrm{mod}\ 4)$ and $\dim q_0 \geq 2$ , there is always a good solution. Moreover, a bad type solution cannot exist for $q \simeq u_1 x_1^2 + u_2 x_2^2 + u_3 p x_3^2 + u_4 p x_4$ if $p \equiv 3 \,(\textrm{mod}\ 4)$ . Indeed, all solutions of $x_1^2 + x_2^2 + p x_3^2 + p x_4^2 \equiv 0 \,(\textrm{mod}\ p^2)$ satisfy $x \equiv 0 \,(\textrm{mod}\ p)$ for $p \equiv 3 \,(\textrm{mod}\ 4)$ . The cases $m \geq 5$ work analogously to $m=4$ .
Since $\nu \leq v_p(N)$ , it follows for $m=4$ that $\prod_p \beta_p(q,n) \gg (n,N)^{-\frac{1}{2}} (nN)^{-{\epsilon}}$ if n is primitively represented. A form in 5 variables is isotropic over ${\mathbb Z}_p$ and hence if we sort $\nu_i$ by value, there is always a primitive solution x such that $\nu(x) \le \nu_5$ . Hence, we obtain for $m \geq 5$ that
For a given form, it is often possible to find a primitive solution with $\nu=0$ for all $p \mid (n,N)$ which yields $\prod_p \beta_p(q,n) \gg (nN)^{-{\epsilon}}$ .
3. A uniform bound for the inner product
The aim of this section is to prove Theorem 1, 2 and 3. Recall that the Siegel domain $\mathcal{S}(\delta,\eta)$ consists of all positive matrices M that allow for a decomposition into
where V is an upper triangular matrix with ones on the diagonal and all other entries $|{v_{i,j}}| \leq \eta$ and D is a diagonal matrix with entries $a_1, \ldots, a_{m} $ that satisfy $0 < a_i \leq \delta a_{i+1}$ .
Let Q denote a positive, integral matrix with even diagonal entries. By [Reference Cassels8, p. 259], the class of Q contains an element $Q' \in \mathcal{S}({4}/{3},{1}/{2})$ . We decompose $Q'=V^T DV$ as above and call $a_1,\ldots,a_m$ the associated diagonal entries of Q. Since $a_1$ equals the upper left entry of Q $^{\prime}$ it is integral and thus, $a_1 \geq 1$ . This construction of $a_1,\ldots,a_m$ with respect to Q is not unique. If we assume that Q $^{\prime}$ is Hermite-reduced, then $a_i$ is of the same size as the i-th successive minimum of Q, cf. [Reference Cassels8, section 12, theorem 3·1].
Lemma 9. Let Q correspond to a positive, integral quadratic form of level N with associated diagonal entries $a_1,\ldots,a_m$ . Then,
Furthermore, it holds that
More precisely, for $2 \le j \le 2m-2$ the j-th term is given by $\frac{l^{j/2}}{ A_j}$ where
Moreover, we have
where
Proof. Since $r(Q,n) = r(U^T Q U, n)$ for any $U \in \textrm{GL}_{m}({\mathbb Z})$ , we may assume that $Q \in \mathcal{S}({4}/{3},{1}/{2})$ . If we decompose $Q=V^T D V$ with V and D as above, we obtain that
We count the number of solutions of $q(x) =n$ . For $x_3,\ldots,x_{m}$ there are at most
choices. After that, we are left with a binary problem that has $\mathcal{O}(n^{{\epsilon}})$ solutions uniformly in all parameters, cf. [Reference Blomer and Pohl5, lemma 8(a)]. This yields
If we want to count all solutions of $q(x) \leq l$ , we proceed as before, but bound the number of solutions for $x_1$ and $x_2$ by $\big(2\sqrt{{2l}/{a_1}} +1 \big) \text{ and } \big(2\sqrt{{2l}/{a_2}}+1\big).$ Thus, we obtain
Then, we obtain (16) by applying these bounds and using that $a_1 \cdots a_m = \det Q$ .
Next, we consider the quadratic form corresponding to $NQ^{-1}$ . Note that
The diagonal entries of $ND^{-1}$ are
The lowest diagonal entry ${N}/{a_{m}}$ of D equals the lower right entries of $N Q^{-1}$ since $V^{-1}$ is an upper and $V^{-T}$ a lower diagonal matrix with ones on the diagonal. Hence, ${N}{a_{m}} \in {\mathbb Z}$ and thus $a_m \leq N$ . Together with $a_i \geq 1$ and $a_i \leq \frac{4}{3} a_{i+1}$ , this gives (15).
Moreover, it holds that
where $w_{ij}$ are the entries of $V^{-1}$ . Their absolute value $|w_{ij}|$ is bounded from above by a constant. To see this, write $V= I + M$ for the $m\times m$ identity I and a nilpotent matrix M. Then, a simple calculation shows that $V^{-1} = (I+M)^{-1} = I + \sum_{k=1}^{m-1} (\!-1)^k M^k$ .
Next, we count solutions of $\tilde{q}(x) =n$ . For $x_1,\cdots x_{m-2}$ there are
choices and $\mathcal{O}(n^{\epsilon})$ for $x_{m-1} $ and $x_m$ . It follows that
Moreover, we obtain by the same argument as above that
Combining these bounds yields the last claim.
The level of a form is easily determinable by the local splittings:
Lemma 10. Let $q= x^T Q x/2$ be equivalent over ${\mathbb Z}_p$ to (4) for odd p and to (5) for $p=2$ . Set
Then, the level N of Q is given by $N = \prod_{p} p^{\nu(p)}$ .
Proof. For odd p, choose $U \in \textrm{GL}_m({\mathbb Z}_p)$ such that $\tilde{Q} = U^T Q U$ is diagonal with entries $u_i p^{\nu_i(p)}$ . It follows that $N \tilde{Q}^{-1} = U^{-1} N Q^{-1} U^{-T}$ , thus $p^{\nu_i(p)} \mid N$ for all p. For the other inclusion, we ise that every entry of $p^{\nu(p)} Q^{-1} = U^{-1} p^{\nu(p)} \tilde{Q}^{-1} U^{-T}$ is in ${\mathbb Z}_p \cap {\mathbb Q} = \{{a}/{b} \in {\mathbb Q} \mid p \nmid b \}$ . For $p=2$ , we choose $U \in \textrm{GL}_m({\mathbb Z}_2)$ such that $\tilde{Q} = U^T Q U$ is of the form (5). By
and the same argument as before, the claim follows
To evaluate the Fourier coefficients of $\theta(Q,z)|\left(\begin{smallmatrix}a & b \\ c & d\end{smallmatrix}\right)$ , we construct a diagonal matrix D that depends on Q and c. To this end, let $c= \tilde{c} 2^t$ for odd $\tilde{c}$ and fix $U \in \textrm{SL}_m({\mathbb Z})$ such that $x^T U^T Q U x/2 \equiv \sum_{i=1}^m q_i x_i^2 \,(\textrm{mod}\ \tilde{c})$ and
for odd $u_i \in {\mathbb Z}$ and $g_i(x_{2i-1}, x_{2i}) = (x_{2i-1}^2 + x_{2i-1} x_{2i} + x_{2i}^2)$ or $x_{2i-1} x_{2i}$ , $\tilde{\nu}_i,\nu_i \le t$ . We set $\tilde{d}_i = (q_i,\tilde{c},N)$ , $t_{2i-1} = t_{2i} = \tilde{\nu}_i$ for $i \leq r$ ,
Furthermore, we set $\eta = \eta(Q,t) \,{:\!=}\, \#\{ i > 2r \mid t > \nu_i \}$ , $\kern3pt\hat{\kern-3pt d} \,{:\!=}\, d/2$ if $2^2 \mid\!\mid N, 2 \mid\!\mid d$ and $2r<m$ and $\kern3pt\hat{\kern-3pt d}=d$ otherwise. Moreover, let $u_i$ denote the i-th column of U and $\tilde{x}_i \,{:\!=}\, {u_i^T x}/{2^{\nu_i}} \in {\mathbb Z}$ . Then, we set $\delta(x) =0$ if there is $i>2r$ such that $\tilde{x}_i$ is even and $t=\nu_i+1$ or $\tilde{x}_i$ is odd and $t > \nu_i+2$ . In all other cases, we put $\delta(x)=1$ .
Lemma 11. Let U, D as above and set $\tilde{Q} = U^T Q U$ . Then $\frac{N}{\kern3pt\hat{\kern-3pt d}} D \tilde{Q}^{-1} D$ corresponds to a positive, integral quadratic form of level $\le N$ .
Proof. By construction $2 D^{-1} \tilde{Q}$ corresponds to a positive, integral quadratic form. Over ${\mathbb Z}_p$ and p odd, $q= x^T D^{-1} \tilde{Q} x$ is equivalent to $\tilde{u}_1 \frac{p^{\nu_1}}{(p^{\nu_1},\,d)} x_1^2 + \cdots + \tilde{u}_m \frac{p^{\nu_m}}{(p^{\nu_m},\,d)} x_m^2.$ Over ${\mathbb Z}_2$ , q is equivalent to
By Lemma 10, this implies that $2 D^{-1} \tilde{Q}$ has level $4{N}/{d}$ if the maximum of $2^{\nu_{i}+1 -t_i} + 2 \delta_{i> 2r}$ is attained for $i>2r$ and $t = \nu_i+1$ and $2{N}/{d}$ otherwise. Hence, ${N}D \tilde{Q}^{-1} D/d$ has even diagonal entries unless $2^2 \mid\!\mid N, 2 \mid\!\mid d$ and $2r < m$ .
For simplicity, we omit the weight ${m}/{2}$ in the slash operator $|[\varrho]_{\frac{m}{2}}$ .
Lemma 12. Let $\varrho = \left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix}\right) \in \textrm{SL}_2({\mathbb Z})$ , with $\varrho \notin \Gamma_0(N)$ . Moreover, let $D, \eta, \delta(x)$ and $\kern3pt\hat{\kern-3pt d}$ as above Lemma 11 and $\tilde{Q}$ as in Lemma 11. Then,
for some $|\omega|=1$ . For $S \,{:\!=}\, \frac{N}{\kern3pt\hat{\kern-3pt d}}D \tilde{Q}^{-1} D$ , it follows that
If $d=(c,N)=1$ , we have that $|a(n)| = {r(NQ^{-1})}/{\sqrt{\det Q}}$ .
Proof. By the factorisation $ \varrho = \left(\begin{smallmatrix} 1 & a / c \\ & 1 \end{smallmatrix}\right) \left(\begin{smallmatrix} & - 1 / c \\ c \end{smallmatrix}\right)\left( \begin{smallmatrix} 1 & d / c \\ & 1 \end{smallmatrix}\right)$ and the transformation formula for the generalised theta series, cf. [Reference Siegel27, p. 575], we get that
where
We write $c = \tilde{c} \, 2^t$ with odd $\tilde{c}$ and decompose this sum into
Next, we choose $U \in \textrm{SL}_m({\mathbb Z})$ as in Lemma 11 and substitute v, w by Uv, Uw. Since $ v^TU^TQUv/2 \equiv \sum_{i=1}^m q_i v_i^2 \,(\textrm{mod}\ \tilde{c})$ we obtain for $G(a,b,c) \,{:\!=}\, \sum_{x\textrm{mod}\ c} e\Big(({ax^2+bx})/{c}\Big)$ that
where $u_i$ denotes the i-th column of U. The i-th sum vanishes unless $d_i \mid u_i^T x$ for $d_i \,{:\!=}\, (\tilde{c},q_i)$ . By completing the square, the previous display equals
where $\tilde{q}_i = q_i / d_i, \tilde{c}_i = \tilde{c}/d_i$ and $\tilde{x}_i=u_i^T x / d_i$ . The absolute value of the term above is $\tilde{c}^\frac{m}{2} \sqrt{\tilde{d}_1} \cdots \sqrt{\tilde{d}_m}$ . Furthermore, we have for U as in Lemma 11 that
where $b_i$ are odd integers, $0\leq 2r_1 \leq 2r_2 \leq m$ , $g(x_{2i-1},x_{2i}) = x_{2i-1}^2 + x_{2i-1}x_{2i} + x_{2i}^2$ and $\tilde{\nu_i},\nu_i \leq t$ . For $i > 2r_2$ , we need to evaluate $ G(2^{\nu_i} b_i a \tilde{c}, u_i^T x, 2^t )$ which vanishes unless $u_i^T x \equiv 0\,( \textrm{mod}\ 2^{\nu_i})$ . For $\tilde{x}_i ={u_i^T x}/{2^{\nu_i}}$ , this sum $G(2^{\nu_i} b_i a \tilde{c}, u_i^T x, 2^t )$ equals
where $\omega \,{:\!=}\, {\epsilon}_{ b_i a \tilde{c}}^{-1} \left({2^{t-\nu_i}}/{b_i a \tilde{c}}\right) e(1/8)$ . For forms of type $2^{\tilde{\nu}} (x_1^2 + x_1 x_2 +x_2^2)$ , we have that
where $\tilde{x}_i \,{:\!=}\, {u_i^T x}/{2^{\tilde{\nu}}}$ and $\zeta$ is a root of unity that does not depend on x.
For $t= \tilde{\nu}$ the claim is obvious. If $t = \tilde{\nu}+1$ , the latter sum vanishes unless $\tilde{x}_2 + a \tilde{c} w_1$ is odd and (21) equals
If $t \geq \tilde{\nu}+2$ , the second sum vanishes unless $\tilde{x}_1 + a \tilde{c} w_1$ is even. In this case (21) equals
For forms of type $2^{\tilde{\nu}} x_{1} x_{2}$ we obtain by a simple computation
provided that $\tilde{x}_1, \tilde{x}_2 \in {\mathbb Z}$ .
It follows that $\alpha(x,Q,\varrho)$ vanishes unless $D^{-1} U^T x \in {\mathbb Z}^m$ . If this holds, we have that
for some $\omega$ with $|{\omega}|=1$ . Substituting x by $U^{-T} D x$ in (18) yields the first claim of the lemma.
The absolute value of the n-th Fourier coefficient of $\theta|[\varrho](z) = \sum_n a(n) e(\kern3pt\hat{\kern-3pt d} nz/N)$ is given by
where $S\,{:\!=}\, \frac{N}{\kern3pt\hat{\kern-3pt d}} D \tilde{Q}^{-1}D$ . For $d=(N,c)=1$ , we have that $\eta= \delta(x)=1$ for all x. To prove $|a(n)| = r(NQ^{-1}) / \sqrt{\det Q}$ , it remains to show that $\alpha(x,Q,\varrho)$ only depends on n and not on the particular choice of x. By (19) it suffices to consider the Gauss sum modulo c. By (20), the dependence on x modulo $\tilde{c}$ is given by
For the last step, we use that $d_i=1$ and hence, $U^TQU/2 = \textrm{diag}(q_1,\ldots,q_m)$ is invertible modulo $\tilde{c}$ which implies that $n = x^T N Q^{-1} x/2 \equiv N \sum_{i=1}^m \overline{q_i} \tilde{x}_i^2 \,(\textrm{mod}\ \tilde{c})$ . If N is even, then c must be odd. If N is odd, then m must be even and there are no diagonal terms in the splitting over ${\mathbb Z}_2$ . Since the inverse of $(\begin{smallmatrix} 2 & 1 \\ 1 & 2 \end{smallmatrix})$ modulo $2^t$ is given by $\overline{3} (\begin{smallmatrix} 2 & -1 \\ -1 & 2 \end{smallmatrix})$ we obtain that
It follows by (21) and (22) that the dependence on x of the Gauss sum modulo $2^t$ is given by $e\Big(\!-{n\overline{\tilde{c}aN}}/{2^t} \Big)$ .
This provides the necessary tools to prove our main result:
Proof of Theorem 1 and 2. Both f and g are cusp forms since the value of $\theta(Q,z)$ at each cusp depends only on a genus-invariant term. Set $\mu = [\textrm{SL}_2({\mathbb Z}) : \Gamma_{0}(N)]$ , $\tilde{\mu} = [\textrm{SL}_2({\mathbb Z}): \Gamma(N)]$ and recall that
We obtain
for a set of coset representatives $\tau_i$ of $\Gamma(N) \backslash \textrm{SL}_2({\mathbb Z})$ . On this set, we define an equivalence relation
For the remaining matrices, a set of representatives is given by
For simplicity, we set $\varrho \,{:\!=}\, \varrho_{a,c}$ . It follows that
where $F = \{x+iy \mid - {1}/{2} \le x \le {1}/{2}, |x+iy| \geq 1 \}$ is a fundamental domain of $\textrm{SL}_2({\mathbb Z}) \backslash {\mathbb H}$ . We put $d=(c,N)$ and write $g|[\varrho] = \sum_n a_{\varrho}(n) e\big({n \kern3pt\hat{\kern-3pt d} z}/{N} \big)$ for $\kern3pt\hat{\kern-3pt d}$ either $d/2$ or d. By the previous display, it follows that
For $c=0$ , we have $d=N$ and $a_\rho(n) = r(Q,n) - r(Q',n)$ . Hence, the contribution of this case is bounded by $\mathcal{O}(N^{\epsilon})$ . For $c \neq 0$ we apply Lemma 12. This gives
for matrices $D_\varrho, S_\varrho,\tilde{S}_\varrho$ given as in Lemma 12. Let $a'_1,\ldots,a'_m$ denote the associated diagonal entries of $S_\varrho$ . By Lemma 9 we infer that
To estimate this sum, we use $a'_1 a'_2 \ll (\det S_\varrho)^{\frac{2}{m}}$ and $a'_i \ll N$ for $3 \le i \le m$ and $\det S_\varrho = (N/d)^m (\det D_\varrho)^2 (\det Q)^{-1}$ . This yields that the j-th term is bounded by
If m is even, we use that $a_i \gg 1$ and bound the $j=m-1$ term by
By construction, $\det D_\varrho$ only depends on $d=(c,N)$ . Since there are $\phi({N}/{d})$ choices for $(c,N)=d$ and ${\phi(d)}/{d}N$ for a, it follows by the previous five displays that
For the first d-sum, we use that
This bound is sharp for at least one d which can be constructed as follows. Let $v_p(j)$ defined as after (5), choose $k_p$ maximal such that $v_{p}(k_p) \geq {m}/{2}$ and set $d= \prod_{p \mid N} p^{k_p}$ .
By (24) and (25) we obtain the bound for $m=3$ and $m=4$ . For $m \ge 5$ , we estimate
By definition, the same bounds hold for $\langle \,f,f \rangle$ . If Q is diagonal, we can do slightly better. The Fourier coefficients $a_\varrho(n)$ of $(f|[\varrho])(z)$ are bounded by
For the latter term, we make use of (14):
As a result, the contribution of $r(\textrm{gen}\ S_\varrho,n)$ is bounded by $\mathcal{O}(N^{{\epsilon}})$ .
For $Q = \textrm{diag}(a_1,\ldots,a_n)$ , the diagonal entries of $S_\varrho$ are given by
We sort these entries by value and denote them by $a'_1,\ldots,a'_m$ . For $3 \le l_1,l_2 \le m+1$ , we estimate
Thus, we get
Applying (25) gives the second upper bound of Theorem 1.
It remains to determine a lower bound:
Proof of Theorem 3. By (23), we have that
where $\varrho= (\begin{smallmatrix}a & * \\ c & *\end{smallmatrix})$ . For $t>0$ , it holds by substitution and [13, 2·33·5] that
We drop all terms with $(c,N) > 1$ . For the remaining c and a, we have by Lemma 12 that $|a_\varrho(n)|^2 = (\det Q)^{-1} |r(NQ^{-1},n) - r(\textrm{gen}\ NQ^{-1},n)|^2$ . Since $\frac{\mu}{\tilde{\mu}} N \varphi(N) = 1$ it follows that
By (14) the latter term is bounded by $\mathcal{O}(N^{\epsilon})$ . For the former term, we apply Hermite’s theorem. This gives
As a result, we obtain
This yields the claim.
4. Estimates for the error term
We start by deriving uniform estimates for the ternary case:
Lemma 13. Consider a positive, integral, ternary quadratic form $q(x) = x^T Q x/2$ . Then,
where $\tilde{n}$ is the largest divisor of n such that $(\tilde{n},N^\infty)$ is squarefree and
Proof. By a local argument of Blomer [Reference Blomer2, section 1·3], it is possible to write
for $Q_j, Q'_j$ in the same spinor genus and of level dividing N, $\sum_j |\gamma_j| \ll (nN)^{\epsilon}$ , $m_j v_j w_j\mid n$ for all j, $(m_j,N)=1$ , $w_j$ squarefree, $v_j \mid N^2$ and q anisotropic over all prime divisors of $v_j$ . The claim now follows by applying Theorem 1 and (8).
For $m \geq 4$ , we determine an effective lower bound for n with respect to Q. To this end, recall the definition of F(Q, s) given in (6).
Lemma 14. Let Q correspond to a positive, integral, quadratic form in m variables. Then, we have for $m=4$ that
Let $\prod_p \beta_p(q,n) \gg \beta^{-1} (nN)^{-{\epsilon}}$ . Then, $r(Q,n) \geq 1$ holds if
For $m \geq 5$ , we have $r(Q,n) \geq 1$ if
Moreover, we have that
Proof. We apply (3) to bound the Fourier coefficients of $f(z) =\theta(Q,z)- \theta(\textrm{gen}\ Q,z)$ . For even m this is a result from [Reference Iwaniec and Kowalski18, corollary 14·24]. Since the Weil bound also holds for Kloosterman sums twisted by a quadratic character, cf. [Reference Waibel30, lemma 4], this result can be extended to odd m. In addition, we have for even m that
by applying Deligne’s bound, cf. [Reference Schulze–Pillot and Yenirce26, theorem 11].
For $m=4$ , this result implies a substantial saving compared to previous lower bounds such as [Reference Rouse23, theorem 1]. For example if $(n,N) =1$ and $\det Q = F(Q,2)$ , a lower bound is given by $n \gg (N^2 + (\det Q)^{4/3})N^{\epsilon}$ . For $m=6$ , we obtain
which improves the lower bound $n \gg (\det Q)^{\frac{12}{5}}$ of Hsia and Icaza [Reference Hsia and Icaza16].
5. Applications
We start with the problem of representing an integer by three squares of almost primes. To this end, we want to sieve the sequence
where $n \equiv 3\,(\textrm{mod}\ 24)$ , $5 \nmid n$ . Let d denote a squarefree integer and $\mathcal{A}_d$ the subset of all $a \in \mathcal{A}$ that are divisible by d. Moreover, let $\textbf{l} = (l_1,l_2,l_3)$ , $\mu(\textbf{l}) = \mu(l_1) \mu(l_2) \mu(l_3)$ and $q_\textbf{l}(x) = l_1^2 x_1^2 + l_2^2 x_2^2 + l_3^2 x_3^2$ with corresponding matrix $Q_\textbf{l}$ . An application of the inclusion-exclusion principle gives
We decompose $r(Q_\textbf{l},n) = r(\textrm{gen}\ Q_\textbf{l},n) + a(n)$ . For the main term, we have
For $\textbf{1}=(1,1,1)$ , we have $\beta_p(Q_\textbf{1},n) \gg n^{-{\epsilon}}$ for $n \equiv 3\, (\textrm{mod}\ 8)$ . Hence, we may set
and
The functions $\omega(\textbf{l},n)$ are explicitly computed in [Reference Blomer and Brüdern3, lemma 3·1 and 3·2]. This yields for $n \equiv 3 \,(\textrm{mod}\ 24)$ , $5 \nmid n$ that $0 \leq \Omega(p) <p$ . Furthermore, there is constant $A \ge 2$ such that
For $X \,{:\!=}\, \frac{\pi}{4} n^\frac{1}{2} \prod_p \beta_p(Q_\textbf{1},n)$ , we obtain that $|\mathcal{A}_d| = \frac{\Omega(d)}{d} X + R_d(\mathcal{A})$ , where
Let $F_3(s)$ and $f_3(s)$ denote the three dimensional sieve functions given in [Reference Diamond and Halberstam10, theorem 1]. Then, it holds by [Reference Diamond and Halberstam10, theorem 1] for $\kappa =3$ that:
Lemma 15. Let $\mathcal{A}, X, \Omega$ as above and write v(d) for the number of prime factors of d. Furthermore, let
for $\tau \in {\mathbb R}$ with $0< \tau <1$ . Then, it holds for any $u,v \in {\mathbb R}$ with $1/\tau <u <v$ and $\tau v > \beta_3 \,{:\!=}\, 6.6408$ that
provided only that
We prove the following improvement of [Reference Lü20, lemma 4·1]:
Lemma 16. Let $n \equiv 3\, (\mathrm{mod}\ 24), 5 \nmid n$ and $\tau < {3}/{58}$ . Then,
Proof. We only consider combinations of $l_1,l_2,l_3$ such that either $r(Q_\textbf{l},n) \neq 0$ or $r(\textrm{gen}\ Q_\textbf{l},n) \neq 0$ . The remaining forms are isotropic over all odd primes and satisfy $2 \nmid l_1l_2l_3$ . It follows by (9) that $r(\textrm{gen}\ Q_\textbf{l},n) = r(\textrm{spn}\ Q_\textbf{l},n)$ . Since the level of $Q_\textbf{l}$ is given by 4d we infer by Lemma 13 that
where we estimated $\#\{ \textbf{l} \in {\mathbb N}^3 \mid [l_1,l_2,l_3] =d\} \le \tau(d)^3 \ll d^{\epsilon}$ in the second step. For $\tau < {3}/{58}$ the display above is bounded by $\ll n^{\frac{1}{2}-{\epsilon}}$ .
To avoid the computation of $F_3(s)$ and $f_3(s)$ , we apply a well known trick. If we set $\tau u = 1 + \zeta - \zeta/ \beta_3$ and $\tau v = \beta_3 / \zeta + \beta_k -1$ , it follows by (10·1·10), (10·2·4) and (10·2·7) in [Reference Halberstam and Richert14] that
This gives the following slightly weaker version of (27):
For $\tau = 3/58$ it follows that
This proves Corollary 4.
Even for four squares of primes, current technology is not sufficient to prove that every $n \equiv 4\,(\textrm{mod}\ 24)$ is represented. By means of sieving and Theorem 1, we can address this problem for almost primes. Here, the main input is:
Lemma 17. Let $n \equiv 4\, (\mathrm{mod}\ 24)$ , $\tau < {1}/{2}$ , $q_\textbf{l}(x) = l_1^2 x_1^2 + l_2^2x_2^2+l_3^2 x_3^2 + x_4^2 l_4^2$ . Then,
By applying the weighted four dimensional sieve from [Reference Diamond and Halberstam10] it follows that every $n\equiv 4\, (\textrm{mod}\ 24)$ is represented by $x_1^2 + x_2^2 + x_3^2 + x_4^2$ with $x_1 x_2 x_3 x_4 \in P_{20}$ . However, a recent approach by Tsang, Zhao [Reference Tsang and Zhao29] and Ching [Reference Ching9] yields much better results. Their idea is to choose one of the $x_i$ ’s as a prime and then to combine Chen’s switching result with a three dimensional sieve. This shows that $n = p^2 + x_1^2 + x_2^2 + x_3^2$ for a prime p and $x_1x_2x_3 \in P_{12}$ .
To tackle the problem of representing an integer by three squares of smooth numbers, we follow the approach in [Reference Blomer, Brüdern and Dietmann4]. The underlying idea is to choose integers $d_1,d_2,d_3 \in [n^{\eta}, 2 n^{\eta}]$ with $\eta$ as large as possible such that
is soluble. To obtain a lower bound for $r(\textrm{spn}\ Q,n)$ , we choose $d_1,d_2,d_3$ to be distinct primes that are $\equiv 1 \,(\textrm{mod}\ 4)$ and coprime to n. This implies that
Furthermore, we obtain by Lemma 13 that
Hence, for $\eta = {1}/{116}-{\epsilon}$ , equation (29) is dominated by (28) and it follows that $r(Q,n) \geq 1$ for n sufficiently large. This proves the first claim of Corollary 5.
To derive results for sums of four squares, we make use of the distribution of smooth numbers in short intervals. For every $n \in {\mathbb N}$ it is possible to choose x with largest prime factor not exceeding $n^\frac{1}{4}$ such that $0 \leq n -x^2 \leq n^\frac{5}{8}$ and ${n -x^2 \not\equiv 0,1,4,7\,(\textrm{mod}\ 8)}$ , see [Reference Blomer, Brüdern and Dietmann4, section 5] for details. By our previous result for three squares, this implies that every sufficiently large n is represented by the sum of four squares whose largest prime divisors do not exceed $n^\frac{\theta}{2}$ where $\theta = {285}/{464}$ .
The bounds for three smooth squares can be improved, if we choose $d_1 = e_1 e_2$ , ${d_2 = e_1 e_3}$ and $d_3 = e_2 e_3$ for $e_1,e_2,e_3$ mutually coprime and $(e_1e_2e_3,n)=1$ . However, this only works, if $\big({p}/{n} \big) =1$ for every prime divisor p of $e_1 e_2 e_3$ , since then $\beta_p(n,Q) = 1 + \big({p}/{n} \big) =2$ . If this latter condition is satisfied, we can choose $\eta = {1}/{80}- {\epsilon}$ .