Skip to content
Open Access

Almost universal ternary sums of polygonal numbers

Research in Number Theory20184:4

Received: 7 April 2017

Accepted: 31 October 2017

Published: 31 January 2018


For a natural number m, generalized m-gonal numbers are those numbers of the form \(p_m(x)=\frac{(m-2)x^2-(m-4)x}{2}\) with \(x\in \mathbb Z\). In this paper we establish conditions on m for which the ternary sum \(p_m(x)+p_m(y)+p_m(z)\) is almost universal.


Sums of polygonal numbersTernary quadratic polynomialsAlmost universal formsTheta seriesLattice theory and quadratic spacesModular formsSpinor genus theory

Mathematics Subject Classification


1 Introduction

For a natural number m, the x-th generalized m-gonal number is given by \(p_m(x)=\frac{(m-2)x^2-(m-4)x}{2}\) where \(x\in \mathbb Z\). In 1638, Fermat claimed that every natural number may be written as the sum of at most 3 triangular numbers, 4 squares, 5 pentagonal numbers, and in general m m-gonal numbers. Lagrange proved the four squares theorem (the \(m=4\) case) in 1770, Gauss proved the the triangular number theorem (the \(m=3\) case) in 1796, and Cauchy proved the full claim in 1813 [1, 2]. Guy [9] later investigated the minimal number \(r_m\in \mathbb {N}\) chosen such that every natural number may be written as the sum of \(r_m\) generalized m-gonal numbers. For \(m\ge 8\), Guy noted that an elementary argument shows that one needs \(m-4\) generalized m-gonal numbers to represent \(m-4\), so \(m-4\le r_m\le m\). However, he pointed out that for large enough \(n\in \mathbb {N}\), one could likely represent n with significantly fewer generalized m-gonal numbers. In this paper, we investigate for which m every sufficiently large \(n\in \mathbb {N}\) is the sum of three m-gonal numbers. That is to say, we study representations of natural numbers by the ternary sum
$$\begin{aligned} P_m(x,y,z):=p_m(x)+p_m(y)+p_m(z), \end{aligned}$$
and we ask for which m the form \(P_m\) is almost universal; a form is called almost universal if it represents all but finitely many natural numbers. In other words, we would like to determine the set of m for which the set
$$\begin{aligned} \mathcal {S}_m:=\left\{ n\in \mathbb {N}: \not \exists (x,y,z)\in \mathbb {Z}^3\text { with } P_m(x,y,z)=n\right\} \end{aligned}$$
is finite. The set \(\mathcal {S}_m\) is those positive integers which are not represented by \(P_m\), and we call \(P_m\) almost universal if \(\mathcal {S}_m\) is finite.

Theorem 1.1

If \(m\not \equiv 2\pmod {3}\) and \(4\not \mid m\), then \(P_m\) is almost universal.


  1. (1)

    Theorem 1.1 states that for \(m\not \equiv 2\pmod {3}\) and \(4\not \mid m\), every sufficiently large natural number may be written as the sum of at most three generalized m-gonal numbers. However, its proof relies on Siegel’s ineffective bound [24] for the class numbers of imaginary quadratic orders, so the result does not give an explicit bound \(n_m\) such that every \(n>n_m\) may be written as the sum of three generalized m-gonal numbers.

  2. (2)
    Questions of almost universality have recently been studied by a number of authors, but in a slightly different way. In most cases, \((m_1,m_2,m_3)\in \mathbb {N}_{\ge 3}^3\) has been fixed and authors investigated representations by weighted sums of the type
    $$\begin{aligned} ap_{m_1}(x)+bp_{m_2}(y)+cp_{m_3}(z). \end{aligned}$$
    In particular, authors worked on the classification of abc for which the above form is almost universal; on the contrary, in Theorem 1.1 we fix a, b, and c and vary m. In [13], for example, a classification of such abc was given for \(m_1=m_2=4\) and \(m_3=3\). In the case of a weighted sum of triangular numbers, a partial answer was given in [13], and the characterization of such almost universal sums was completed by Chan and Oh in [3]. The most general result to date appears in [10], where a characterization of almost universal weighted sums of m-gonal numbers is given for \(m-2=2p\) with p an odd prime. In this last case, the results in [10] imply that \(P_m\) is not almost universal (note that \(m\equiv 0\pmod {4}\), so this is partially complementary to the result in Theorem 1.1).

It turns out that the restrictions \(m\not \equiv 2\pmod {3}\) and \(4\not \mid m\) are both necessary in Theorem 1.1, but are of a very different nature. If \(4\mid m\), then there is a local obstruction to \(P_m\) being almost universal, i.e., there is an entire congruence class \(A\mathbb {N}_0+B\subseteq \mathcal {S}_m\) because it is not even represented modulo A. Details of these local obstructions may be found in Lemma 3.1.

The restriction \(m\not \equiv 2\pmod {3}\) (with \(4\not \mid m\)) is much more delicate, and a seemingly deep connection between the analytic and algebraic theory lies beneath this case. In this case, there are no local obstructions, but \(\mathcal {S}_m\) is not necessarily finite. To get a better understanding of the set \(\mathcal {S}_m\), for m even we define
$$\begin{aligned} \mathcal {S}_{m,3}^{{\text {e}}}:=\left\{ n\in \mathcal {S}_m: \exists r\in \mathbb {Z}\text { with }2(m-2)n+3\left( \frac{m-4}{2}\right) ^2 = 3r^2\right\} \end{aligned}$$
and for m odd we define
$$\begin{aligned} \mathcal {S}_{m,3}^{{\text {o}}}:=\left\{ n\in \mathcal {S}_m: \exists r\in \mathbb {Z}\text { with }8(m-2)n+3(m-4)^2 = 3r^2\right\} . \end{aligned}$$
We next see that if \(m\equiv 2\pmod {3}\), then most of the exceptional set \(\mathcal {S}_m\) is contained in \(\mathcal {S}_{m,3}^{{\text {e}}}\) if \(m\equiv 2\pmod {4}\) and contained in \(\mathcal {S}_{m,3}^{{\text {o}}}\) if m is odd.

Theorem 1.2

  1. (1)

    If \(m\equiv 2\pmod {12}\), then \(\mathcal {S}_m\setminus \mathcal {S}_{m,3}^{{\text {e}}}\) is finite.

  2. (2)

    If \(m\equiv 2\pmod {3}\) and m is odd, then \(\mathcal {S}_m\setminus \mathcal {S}_{m,3}^{{\text {o}}}\) is finite.

The proof of Theorem 1.1 mainly uses the analytic approach and relies on ineffective bounds of class numbers. However, this approach fails to gain any control in determining the sets \(\mathcal {S}_{m,3}^{{\text {e}}}\) and \(\mathcal {S}_{m,3}^{{\text {o}}}\). One is hence motivated to blend the two approaches together in order to investigate these sets. From the algebraic point of view, representations of an integer n by \(P_m\) is equivalent to representations of a related integer by a lattice coset \(L+\nu \), where \(L=L_{(m)}\) and \(\nu =\nu _{(m)}\) are completely determined by m (for the precise formulation of L and \(\nu \) see Sect. 2). To explain why combining the algebraic and analytic theories may be beneficial, we recall an important interplay between the analytic and algebraic theories which occurs when \(P_m\) is replaced with the quadratic form Q on the positive-definite ternary lattice L, called the norm on L, which we later emulate. To understand the link, for such a lattice L, let \(\mathcal {L}\) denote the primitive elements of L (those which are not non-zero integral multiples of other elements of L) and set
$$\begin{aligned} \mathcal {S}_{L}:=\{n\in \mathbb {N}: \not \exists \alpha \in \mathcal {L}\text { with }Q(\alpha )=n\}. \end{aligned}$$
Since L is a positive-definite lattice, there will always be local obstructions at an odd number of finite primes, but our main consideration is those \(n\in \mathcal {S}_{L}\) which are locally represented, which we refer to as locally admissible. Moreover, there are finitely many primes p (known as anisotropic primes) for which every \(\nu \in L\) with \(Q(\nu )\) highly divisible by p is necessarily imprimitive (i.e., \(\nu =p\nu '\) for some \(\nu '\in L\)). Therefore, if \(\text {ord}_p(n)\) is large, we immediately conclude that \(n\in \mathcal {S}_L\), so we restrict \(\text {ord}_p(n)\). Using the analytic theory, one can show that for the special case where L is a lattice, the subset of \(n\in \mathcal {S}_L\) which are both locally admissible and have bounded p-adic order (by a specific constant depending on p) at all anisotropic primes p is finite outside of finitely many square classes \(t_1\mathbb {Z}^2,\dots ,t_{\ell }\mathbb {Z}^2\). This follows from a result of Duke and Schulze-Pillot in [7]. The behavior inside these square classes is explained via the spinor norm map in the algebraic theory; this occurs by realizing \(t_j\mathbb {Z}^2\) as a spinor exceptional square class; the primitive spinor exceptions for the genus of L are those integers which are primitively represented by some but not all of the spinor genera in the genus of L. These primitive spinor exceptions are determined by Earnest et al. in [8]. With additional investigation one can use these results to determine the existence of infinite subsets of admissible elements of \(\mathcal {S}_{L}\); from this one can determine that if the subset of admissible elements of \(\mathcal {S}_L\) with bounded divisibility at the anisotropic primes is infinite, then there is at least one spinor exceptional square class.

Returning to our case \(P_m\), one would expect a similar theory of spinor exceptional square classes to emerge if one could link the algebraic and analytic approaches. It is revealing that for \(4\not \mid m\) the only possibly infinite part of \(n\in \mathcal {S}_m\) occurs when \(An+B\) is within the square class \(3\mathbb {Z}^2\), hinting at a synthesis between the approaches yet to be investigated. In order to state a conjectural link in our case, we next recall the link between the two approaches in a little more detail.

The main synthesis between the analytic and algebraic theories goes through the Siegel–Weil (mass) formula. For a lattice \(L_0\) in a positive-definite space, let \(\mathbb {G}(L_0)\) be a set of representatives of the classes in the genus \({\text {gen}}(L_0)\) of \(L_0\). One version of the Siegel–Weil formula states that
$$\begin{aligned} \mathcal {E}_{{\text {gen}}\left( L_0\right) }:=\frac{1}{\sum _{L\in \mathbb {G}\left( L_0\right) } \omega _L^{-1}}\sum _{L\in \mathbb {G}\left( L_0\right) } \frac{\Theta _L}{\omega _L}, \end{aligned}$$
is a certain Eisenstein series. Here \(\Theta _L\) is the theta function associated to L [i.e., the generating function for the elements of L of a given norm; see (2.10)] and \(\omega _L\) is the number of automorphs of L (i.e., the number of linear isometries from L to itself; these are invertible linear maps on the vector space \(\mathbb {Q}L\) which fix L and preserve the associated quadratic form Q). If \(L_0\) has rank 3, then if one instead takes the associated sum over a set \(\mathbb {S}(L_0)\) of representatives of the classes of lattices in the spinor genus \({\text {spn}}(L_0)\), one obtains
$$\begin{aligned} \frac{1}{\sum _{L\in \mathbb {S}(L_0)} \omega _L^{-1}}\sum _{L\in \mathbb {S}(L_0)} \frac{\Theta _L}{\omega _L}= \mathcal {E}_{{\text {gen}}(L_0)} + \mathcal {U}_{{\text {spn}}(L_0)}, \end{aligned}$$
where \(\mathcal {U}_{{\text {spn}}(L_0)}\) is a linear combination of unary theta functions [20, 21]. The Fourier coefficients of \(\mathcal {U}_{{\text {spn}}(L_0)}\) count the excess or deficiency of the weighted average of the number of representations by the spinor genus of \(L_0\) when compared with the weighted average of the number of representations by the genus, giving a direct connection back to the algebraic theory, the spinor norm map, and spinor exceptions. The key observation which makes (1.1) useful is that the left-hand side is a weighted average of modular forms all of whose coefficients are non-negative. Hence if the n-th coefficient of this sum is zero, then the n-th coefficient of each summand must also be zero, and these coefficients count the number of representations of n. On the other hand, the functions appearing on the right-hand side of (1.1) are special types of modular forms whose Fourier coefficients may be explicitly computed.
After rewriting the question about representations by \(P_m\) as a question about representations by a particular lattice coset \(L_{(m)}+\nu _{(m)}\) (defined in (2.1) and (2.2)), one would expect such a theory to hold in our case as well. Indeed, the Siegel–Weil formula for the genus of every lattice coset \(L+\nu \) was proven by van der Blij [26] and then later independently by Shimura [23], who showed that
$$\begin{aligned} \Theta _{{\text {gen}}(L+\nu )}=\mathcal {E}_{{\text {gen}}(L+\nu )}:=\frac{1}{\sum _{M+\nu '\in \mathbb {G}(L+\nu )} \omega _{M+\nu '}^{-1}}\sum _{M+\nu '\in \mathbb {G}(L+\nu )} \frac{\Theta _{M+\nu '}}{\omega _{M+\nu '}}, \end{aligned}$$
is an Eisenstein series, where \(\omega _{M+\nu '}\) is the number of automorphs of the lattice coset and \(\mathbb {G}(L+\nu )\) denotes a complete set of representatives of the classes in the genus of \(L+\nu \). Kneser further showed in [15] how this formula for the genus of lattice cosets follows by investigating the Haar measure on the orthogonal group, but we do not take that perspective in this paper. We conjecture that the expected link holds in the same way for spinor genera of lattice cosets.

Conjecture 1.3

We have
$$\begin{aligned} \Theta _{{\text {spn}}(L+\nu )}:=\frac{1}{\sum _{M+\nu '\in \mathbb {S}(L+\nu )} \omega _{M+\nu '}^{-1}}\sum _{M+\nu '\in \mathbb {S}(L+\nu )} \frac{\Theta _{M+\nu '}}{\omega _{M+\nu '}}=\mathcal {E}_{{\text {gen}}(L+\nu )} + \mathcal {U}_{{\text {spn}}(L+\nu )}, \end{aligned}$$
where \(\mathcal {U}_{{\text {spn}}(L+\nu )}\) is a linear combination of unary theta functions and \(\mathbb {S}(L+\nu )\) denotes a set of representatives of the classes in the spinor genus of \(L+\nu \).

Conjecture 1.3 is useful in two different ways. Firstly, it shows that the number of representations by the spinor genus is usually the same as the number of representations by the genus, and secondly it is useful for showing that certain integers in the support of the unary theta functions are not represented by a given lattice coset. To better understand the utility of Conjecture 1.3 and to motivate why we believe it to be true, we return to \(P_m\). In particular, for \(m=14\), a finite calculation yields the following.

Proposition 1.4

The theta function \(\Theta _{{\text {spn}}(L_{(14)}+\nu _{(14)})}\) satisfies Conjecture 1.3.

As stated above, one of the main advantages of Proposition 1.4 is that one can use it to show that the Fourier coefficients of \(\Theta _{{\text {spn}}(L_{14}+\nu _{14})}\) usually agree with those of
$$\begin{aligned} \mathcal {E}_m:=\mathcal {E}_{{\text {gen}}(L_{(m)}+\nu _{(m)})}. \end{aligned}$$
However, we specifically use Proposition 1.4 to investigate the coefficients supported by the unary theta functions to prove that infinitely many coefficients of \(\Theta _{14}\) in these square classes vanish, where
$$\begin{aligned} \Theta _m:=\Theta _{L_{(m)}+\nu _{(m)}}. \end{aligned}$$
We then build off of this to use Proposition 1.4 to prove that \(P_{m}\) is not almost universal for every \(m\equiv 2\pmod {12}\).

Theorem 1.5

For every \(m\equiv 2\pmod {12}\), the form \(P_{m}\) is not almost universal.


  1. (1)

    For any given lattice coset \(L+\nu \), one can check Conjecture 1.3 with a (possibly long) finite calculation. To show that Conjecture 1.3 is true for all lattice cosets, one would need to develop the algebraic theory further to determine spinor exceptions (resp. primitive spinor exceptions) for lattice cosets, proving a theorem analogous to Schulze-Pillot’s results in [19] (resp. Earnest, Hsia, and Hung’s results in [8]).

  2. (2)

    It is natural to ask whether one expects the forms \(P_m\) to be almost universal in the case that \(m\equiv 2\pmod {3}\) is odd. Guy showed in [9] that \(P_5\) is not only almost universal, but indeed universal. Computer calculations indicate that \(P_{11}\) is also almost universal. In order to prove that any given \(P_m\) in this family is almost universal, it suffices to decompose the associated theta function into an Eisenstein series, a linear combination of unary theta functions, and a cusp form which is orthogonal to unary theta functions. If the contribution from unary theta functions is trivial, then form will be almost universal. Following Conjecture 1.3, one expects the unary theta function contribution to directly appear from the theta function associated to the spinor genus.


The paper is organized as follows. We first give some preliminary definitions and known results in Sect. 2. In Sect. 3, we use algebraic methods to establish the local behavior of \(P_m\). In Sect. 4, we give a proof Theorem 1.1 using analytic methods. We then finally blend the two approaches together in Sect. 5 in order to prove Proposition 1.4 and Theorem 1.5.

2 Preliminaries

In this section, we introduce the necessary objects used in the algebraic proofs.

2.1 Setup for the algebraic approach: lattice theory

For the algebraic approach, we adopt the language of quadratic spaces and lattices as set forth in [17]. If L is a lattice and A is the Gram matrix for L with respect to some basis, we write \(L\cong A\). When A is a diagonal matrix with entries \(a_1,...,a_n\) on the diagonal, then A is written as \(\langle a_1,...,a_n\rangle \). For a lattice L, we let V denote the underlying quadratic space; that is, \(V=\mathbb {Q}L\). In this case, we say that L is a lattice on the quadratic space V. For a lattice L we define the localization of L by \(L_p=L\otimes _\mathbb {Z}\mathbb {Z}_p\), where now \(L_p\) is a \(\mathbb {Z}_p\)-lattice on \(V_p:=V\otimes _{\mathbb {Q}} \mathbb {Q}_p\).

Given a lattice L and a vector \(\nu \in V\), we have the lattice coset \(L+\nu \). If we define a lattice \(M=L+\mathbb {Z}\nu \), then \(L+\nu \) can be regarded as coset inside the lattice quotient M / L. Elements in \(L+\nu \) are simply vectors of the form \(\nu +x\), where \(x\in L\).

We are considering representations of an integer n by the sum \(P_m\), which upon completing the square, is seen to be equivalent to the condition that
$$\begin{aligned} \ell _n:={\left\{ \begin{array}{ll} 3\left( \frac{(m-4)}{2}\right) ^2+2(m-2)n &{} \text { for}~m~\text {even}\\ 3\left( m-4\right) ^2+8(m-2)n &{} \text { for}~m~\text { odd}, \end{array}\right. } \end{aligned}$$
is represented by the lattice coset \(L+\nu \), where \(L=L_{(m)}\) is defined as the \(\mathbb {Z}\)-lattice
$$\begin{aligned} {\left\{ \begin{array}{ll} \langle (m-2)^2,(m-2)^2,(m-2)^2\rangle &{} \text { for}~m~\text { even}\\ \langle 4(m-2)^2,4(m-2)^2,4(m-2)^2\rangle &{} \text { for}~m~\text {odd}, \end{array}\right. } \end{aligned}$$
in the orthogonal basis \(\{e_1,e_2,e_3\}\), and
$$\begin{aligned} \nu =\nu _{(m)}:= \frac{(m-4)}{2(m-2)}\left( e_1+e_2+e_3\right) . \end{aligned}$$
To prove Theorem 1.1, we need to show that all but finitely many \(\ell _n\) are represented by the lattice coset \(L+\nu \).
In order to approach this problem from the algebraic side, we need to develop some algebraic notion of the class, spinor genus, and genus of a lattice coset. Following the definitions that originally appear in [4] the class of \(L+\nu \) is defined as
$$\begin{aligned} {\text {cls}}(L+\nu ):=\text {the orbit of}~L+\nu ~\text {under the action of}~SO(V), \end{aligned}$$
the spinor genus of \(L+\nu \) as
$$\begin{aligned} {\text {spn}}(L+\nu ):=\text {the orbit of}~L+\nu ~\text {under the action of}~SO(V)O'_\mathbb {A}(V), \end{aligned}$$
and the genus of the lattice coset \(L+\nu \) by
$$\begin{aligned} {\text {gen}}(L+\nu ):=\text { the orbit of}~L+\nu ~\text {under the action of}~SO_\mathbb {A}(V), \end{aligned}$$
and where \(O'_\mathbb {A}(V)\) denotes the adeles of the kernel of the spinor norm map, \(\theta :SO(V)\rightarrow \mathbb Q^\times /{\mathbb Q^\times }^2\) as defined in [17, §55]. Note that what we refer to as the genus (resp. spinor genus or class) above is often called the proper genus (resp. proper spinor genus or proper class), and is commonly denoted with a superscript \(+\); e.g., the proper genus is written \({\text {gen}}^+(L+\nu )\), while the (non-proper) genus (resp. spinor genus and class) are usually defined with the corresponding special orthogonal groups (e.g., \(SO_{\mathbb {A}}(V)\)) replaced by the orthogonal groups (e.g. \(O_{\mathbb {A}}(V)\)). Although the genus and proper genus are always equal in the cases of lattices (see [17, §102 A]) this is not always true for lattice cosets. In particular, if \(O(L_p+\nu )\) does not contain an improper isometry (an element of the orthogonal group with determinant \(-~1\)) at some finite prime p, then \(\text {gen}^+(L+\nu )\subsetneq \text {gen}(L+\nu )\). For an example of this phenomenon, we direct the reader to [4, Example 4.5]. In our case we are guaranteed that \(O(L_p+\nu )\) contains a symmetry at every prime p. This is obvious at primes p not dividing \(2(m-2)\) since in this case \(L_p+\nu =L_p\) is just a diagonal lattice. At other primes we can take the symmetry \(\tau _{e_1-e_2}\), which switches the basis elements \(e_1\) and \(e_2\) while fixing \(e_3\). Therefore the \(\text {gen}(L+\nu )=\text {gen}^+(L+\nu )\). Since it will not make a difference in this setting, we choose to define the class, genus, and spinor genus above in terms of the special orthogonal group so that our notation matches that given in [27], which will be helpful to us in what follows. We let \(\mathbb {G}(L+\nu )\) (resp. \(\mathbb {S}(L+\nu )\)) denote a set of representatives of the classes in \({\text {gen}}(L+\nu )\) (resp. \({\text {spn}}(L+\nu )\)). For any further unexplained notation, the reader is directed to [17].
The general strategy will be to show first that there are no local obstructions, i.e. that \(Q(\nu )+2(m-2)n\) is represented by the \({\text {gen}}(L+\nu )\). Next we will determine conditions under which the spinor genus and genus coincide. An essential ingredient here will be to count the number of spinor genera in the genus of a lattice coset. For this we turn to a formula given by Xu in [27], counting the number of spinor genera in \({\text {gen}}(L+\nu )\)
$$\begin{aligned} \left[ J_\mathbb {Q}:\mathbb {Q}^\times \prod _{p\in \Omega }\theta (SO(L_p+\nu ))\right] , \end{aligned}$$
where \(J_\mathbb {Q}\) is the set of ideles of \(\mathbb {Q}\) and \(\Omega \) is the set of primes in \(\mathbb {Q}\) and \(SO(L_p+\nu )\) is the stabilizer of \(L_p+\nu \) in \(SO(V_p)\). One easily checks that (cf. [4])
$$\begin{aligned} SO(L_p+\nu )=\{\sigma \in SO(V_p):\sigma (L_p)=L_p \text { and }\sigma (\nu )\equiv \nu \mod L_p\}. \end{aligned}$$
In Theorem 3.4 we will explicitly compute the image of \(SO(L_p+\nu )\) under the spinor norm map and count the number of spinor genera.

2.2 Setup for the analytic approach: modular forms theory

We require some results about (classical holomorphic) modular forms.

2.2.1 Basic definitions

Let \(\mathbb {H}\) denote the upper half-plane, i.e., those \(\tau =u+iv\in \mathbb {C}\) with \(u\in \mathbb {R}\) and \(v>0\). The matrices \(\gamma =\left( {\begin{matrix} a&{}b\\ c&{}d\end{matrix}}\right) \in {\text {SL}}_2(\mathbb {Z})\) (the space of two-by-two integral matrices with determinant 1) act on \(\mathbb {H}\) via fractional linear transformations \(\gamma \tau :=\frac{a\tau +b}{c\tau +d}\). For
$$\begin{aligned} j(\gamma ,\tau ):=c\tau +d, \end{aligned}$$
a multiplier system for a subgroup \(\Gamma \subseteq {\text {SL}}_2(\mathbb {Z})\) and weight \(r\in \mathbb {R}\) is a function \(\nu :\Gamma \mapsto \mathbb {C}\) such that for all \(\gamma ,M\in \Gamma \) (cf. [18, (2a.4)])
$$\begin{aligned} \nu (M \gamma ) j(M\gamma ,\tau )^r = \nu (M)j(M,\gamma \tau )^r \nu (\gamma )j(\gamma ,\tau )^r. \end{aligned}$$
The slash operator \(|_{r,\nu }\) of weight r and multiplier system \(\nu \) is then
$$\begin{aligned} f|_{r,\nu }\gamma (\tau ):=\nu (\gamma )^{-1} j(\gamma ,\tau )^{-r} f(\gamma \tau ). \end{aligned}$$
A (holomorphic) modular form of weight \(r\in \mathbb {R}\) and multiplier system \(\nu \) for \(\Gamma \) is a function \(f:\mathbb {H}\rightarrow \mathbb {C}\) satisfying the following criteria:
  1. (1)

    The function f is holomorphic on \(\mathbb {H}\).

  2. (2)
    For every \(\gamma \in \Gamma \), we have
    $$\begin{aligned} f|_{r,\nu }\gamma = f. \end{aligned}$$
  3. (3)

    The function f is bounded towards every cusp (i.e., those elements of \(\Gamma \backslash (\mathbb {Q}\cup \{i\infty \})\)). This means that at each cusp \(\varrho \) of \(\Gamma \backslash \mathbb {H}\), the function \(f_{\varrho }(\tau ):=f|_{r,\nu }\gamma _{\varrho }(\tau )\) is bounded as \(v\rightarrow \infty \), where \(\gamma _{\varrho }\in {\text {SL}}_2(\mathbb {Z})\) sends \(i\infty \) to \(\varrho \).

Furthermore, if f vanishes at every cusp (i.e., \(\lim _{\tau \rightarrow i\infty } f_{\varrho }(\tau )=0\)), then we call f a cusp form.

2.2.2 Half-integral weight forms

We are particularly interested in the case where \(r=k+1/2\) with \(k\in \mathbb {N}_0\) and
$$\begin{aligned} \Gamma =\Gamma _1(M):=\left\{ \left( \begin{matrix}a&{}b\\ c&{}d\end{matrix}\right) \in {\text {SL}}_2(\mathbb {Z}): M\mid c, a\equiv d\equiv 1\pmod {M}\right\} , \end{aligned}$$
for some \(M\in \mathbb {N}\) divisible by 4. The multiplier system we are particularly interested in is given in [22, Proposition 2.1], although we do not need the explicit form of the multiplier for this paper.
If \(T^N\in \Gamma \) with \(T:=\left( {\begin{matrix} 1&{}1\\ 0 &{}1\end{matrix}}\right) \), then by (2.8) we have \(f(\tau +N)=f(\tau )\), and hence f has a Fourier expansion (\(a_{f}(n)\in \mathbb {C}\))
$$\begin{aligned} f(\tau )=\sum _{n\ge 0} a_{f}(n) e^{\frac{2\pi i n \tau }{N}}. \end{aligned}$$
The restriction \(n\ge 0\) follows from the fact that f is bounded as \(\tau \rightarrow i\infty \). One commonly sets \(q:=e^{2\pi i \tau }\) and associates the above expansion with the corresponding formal power series, using them interchangeably unless explicit analytic properties of the function f are required.

2.2.3 Theta functions for quadratic polynomials

In [22, (2.0)], Shimura defined theta functions associated to lattice cosets \(L+\nu \) (for a lattice L of rank n) and polynomials P on lattice points. Namely, he defined
$$\begin{aligned} \Theta _{L+\nu ,P}(\tau ):=\sum _{\varvec{x}\in L+\nu } P(\varvec{x}) q^{Q(\varvec{x})}, \end{aligned}$$
where Q is the quadratic map on the associated quadratic space. We omit P when it is trivial. In this case, we may write \(r_{L+\nu }(\ell )\) for the number of elements in \(L+\nu \) of norm \(\ell \) and we get
$$\begin{aligned} \Theta _{L+\nu }(\tau )=\sum _{\ell \ge 0} r_{L+\nu }(\ell ) q^{\ell }. \end{aligned}$$
Shimura then showed (see [22, Proposition 2.1]) that \(\Theta _{L+\nu }\) is a modular form of weight n / 2 for \(\Gamma _1(4N^2)\) (for some N which depends on L and \(\nu \)) and a particular multiplier. Note that we have taken \(\tau \mapsto 2N\tau \) in Shimura’s definition. To show the modularity properties, for \(\gamma =\left( {\begin{matrix}a&{}b\\ c&{}d\end{matrix}}\right) \in \Gamma _1(4N^2)\), we compute
$$\begin{aligned} 2N\gamma (\tau )=2N\frac{a\tau +b}{c\tau +d} = \frac{a(2N\tau ) + 2Nb}{\frac{c}{2N} (2N\tau )+d} = \left( \begin{matrix} a &{} 2Nb\\ \frac{c}{2N} &{} d\end{matrix}\right) (2N\tau ). \end{aligned}$$
Since \(\gamma \in \Gamma _{1}(4N^2)\), we have
$$\begin{aligned} \left( \begin{matrix} a &{} 2Nb\\ \frac{c}{2N} &{} d\end{matrix}\right) \in \Gamma (2N):=\left\{ \gamma = \left( \begin{matrix}a&{}b\\ c&{}d\end{matrix}\right) \in {\text {SL}}_2(\mathbb {Z}): \gamma \equiv I_{2}\pmod {N}\right\} \subset \Gamma _{1}(2N), \end{aligned}$$
so we may then use [22, Proposition 2.1]. Specifically, the multiplier is the same multiplier as \(\Theta ^3\), where \(\Theta (\tau ):=\sum _{n\in \mathbb {Z}} q^{n^2}\) is the classical Jacobi theta function.
We only require the associated polynomial in one case. Namely, for \(n=1\) and \(P(x)=x\), we require the unary theta functions (see [22, (2.0)] with \(N\mapsto 2N^2/t\), \(P(m)=m\), \(A=(2N^2/t)\), and \(h\mapsto 2Nh\), multiplied by \((2N)^{-1}\))
$$\begin{aligned} \vartheta _{h,t}(\tau )=\vartheta _{h,t,N}(\tau ):=\sum _{\begin{array}{c} r\in \mathbb {Z}\\ r\equiv h\pmod {\frac{N}{t}} \end{array}} r q^{t r^2}, \end{aligned}$$
where h may be chosen modulo N / t and t is a squarefree divisor of N. These are weight 3 / 2 modular forms on \(\Gamma _1(4N^2)\) the same multliplier system as \(\Theta _{L+\nu }\).

3 Algebraic approach

As seen in Sect. 2.1, a natural number n is represented by \(P_m(x,y,z)\) if and only if \(\ell _n\) is represented by the lattice coset \(L+\nu \). In this section, we check for local obstructions; i.e., we check whether \(\ell _n\) may be represented by \(L_p+\nu \) for every prime p.

Lemma 3.1

If \(m\equiv 0\pmod 4\) then \(P_m\) is not almost universal.


When \(m=2p+2\) for an odd prime p, then the claim follows immediately from [10, Theorem 7]. Otherwise it can be easily verified that if \(m\equiv 0\pmod 4\) then \(P_m(x,y,z)\) always fails to represent an entire square class modulo 8, and is therefore not almost universal. Specifically, if \(m\equiv 4\pmod {8}\), then \(P_m(x,y,z)\) does not represent any integer congruent to \(-1\) modulo 8, while if \(m\equiv 0\pmod {8}\), then \(P_m(x,y,z)\) does not represent any integer congruent to 4 modulo 8. \(\square \)

In order for \(P_m\) to be almost universal, a necessary condition is that every integer \(\ell _n\) is represented by \({\text {gen}}(L+\nu )\). Since it will be helpful in much of what follows, we define the ternary lattice \(M:=L+\mathbb {Z}\nu \) and note that this lattice has a basis \(\{\nu ,e_1,e_2\}\). We will also define \(T:=\{p\text { prime }:p\mid (m-2)\}\).

Lemma 3.2

For any odd prime \(p\notin T\), we have \(M_p=L_p=L_p+\nu \).


This follows immediately from the fact that \(\nu \in L_p\). \(\square \)

Lemma 3.3

If \(m\not \equiv 0\pmod {4}\), then \(\ell _n\) is represented by \(L_p+\nu \) for every prime p.


For odd \(p\notin T\), Lemma 3.2 implies that \(L_p+\nu =L_p\) and since \(L_p\) is unimodular, it represents every integer in \(\mathbb {Z}_p\) (cf. [17, 92:1b]).

For odd \(p\in T\) and \(p\ne 3\), \(\ell _n\) is a unit in \(\mathbb {Z}_p\), since
$$\begin{aligned} Q(\nu )={\left\{ \begin{array}{ll} 3\left( \frac{m-4}{2}\right) ^2 &{} \text { when}~m-2~\text {is even}\\ 3(m-4)^2 &{} \text { when}~m-2~\text {is odd} \end{array}\right. } \end{aligned}$$
is never divisible by p. Therefore, since \(Q(\nu )\) is represented by \(M_p\), it follows from the local square theorem that \(\ell _n\) is represented by \(M_p\) for every choice of n. Suppose that \(\ell _n\) is represented by an arbitrary coset \(L_p+t\nu \) of \(L_p\) in \(M_p\), where \(t\in \{0,..,p^k-1\}\). Then
$$\begin{aligned} Q(\nu )\equiv Q(\omega +t\nu )\equiv t^2Q(\nu )\pmod {p^k} \end{aligned}$$
for \(\omega \in L_p\). Consequently, \(t=\pm 1\), since the multiplicative group \((\mathbb {Z}/p^k\mathbb {Z})^\times \) contains at most one subgroup of order 2. Therefore \(\ell _n\) is represented by the coset \(L_p+\nu \).
Finally, when \(p=2\), we will proceed by showing that in fact every integer in \(\mathbb {Z}_2\) can be written as an m-gonal number when \(m-2\equiv 0\mod 4\). We may suppose that \(\text {ord}_2(m-2)=k+1\) where \(k>0\). Therefore, \((m-2)=2^{k+1}\epsilon \) and \((m-4)=2\gamma \) where \(\epsilon ,\gamma \in \mathbb {Z}_2^\times \). Then an integer n can be written as an m-gonal number precisely when there exists \(x\in \mathbb {Z}_2\) such that
$$\begin{aligned} n=\frac{(m-2)x^2-(m-4)x}{2}=2^{k}\epsilon x^2-\gamma x. \end{aligned}$$
The x in (3.1) (in the algebraic closure of \(\mathbb {Z}_2\)) is given by
$$\begin{aligned} x=\frac{\gamma \pm \sqrt{\gamma ^2-4(2^k\epsilon )(-n)}}{2^{k+1}\epsilon } =\frac{1\pm \sqrt{1+2^{k+2}\alpha n}}{2^{k+1}\beta } \end{aligned}$$
where \(\alpha =\epsilon /\gamma ^2\) and \(\beta =\epsilon /\gamma \). By the local square theorem, we know that \(1+2^{k+2}\alpha n\) is the square of a unit in \(\mathbb {Z}_2\). Therefore,
$$\begin{aligned} 1+2^{k+2}\alpha n=(1+2^s \delta )^2=1+2^{s+1}\delta +2^{2s}\delta ^2=1+2^{s+1}(\delta +2^{s-1}\delta ), \end{aligned}$$
where \(s>0\) and \(\delta \in \mathbb {Z}_2^\times \), and
$$\begin{aligned} x=\frac{1\pm \sqrt{1+2^{k+2}\alpha n}}{2^{k+1}\beta }=\frac{1\pm \sqrt{(1+2^s \delta )^2}}{2^{k+1}\beta }=\frac{1\pm (1+2^{s}\delta )}{2^{k+1}\beta }. \end{aligned}$$
When \(s>1\), since \(\left| 2^{k+2}\alpha n\right| _2=\left| 2^{s+1}(\delta +2^{s-1}\delta )\right| _2\), it follows that \(k+2+r=s+1\) where \(r=\text {ord}_2(n)\). Therefore,
$$\begin{aligned} x=\frac{1-(1+2^s\delta )}{2^{k+1}\beta }=\frac{2^s\delta }{2^{k+1}\beta }=\frac{2^r\delta }{\beta }\in \mathbb {Z}_2, \end{aligned}$$
since \(s=k+1+r\). On the other hand, when \(s=1\), then \(k+2+r=2+\text {ord}_2(1+\delta )\), and therefore,
$$\begin{aligned} x=\frac{1+\sqrt{(1+2 \delta )^2}}{2^{k+1}\beta }=\frac{1+(1+2\delta )}{2^{k+1}\beta }=\frac{2+2\delta }{2^{k+1}\beta }=\frac{1+\delta }{2^{k}\beta }=\frac{2^r\delta }{\beta }\in \mathbb {Z}_2, \end{aligned}$$
since \(k+r=\text {ord}_2(1+\delta )\). Therefore, since every 2-adic integer can be expressed as an m-gonal number, it follows that every \(\ell _n\) is represented by the coset \(L_2+\nu \).
When \(m-2\) is odd a similar argument follows, by letting \((m-2)=\epsilon \) and \((m-4)=\gamma \) where \(\epsilon ,\gamma \in \mathbb {Z}_2^\times \) and then simply replacing Eq. (3.1) with
$$\begin{aligned} 2n=(m-2)x^2-(m-4)x= \epsilon x^2-\gamma x. \end{aligned}$$
Hence Eq. (3.2) becomes
$$\begin{aligned} x=\frac{\gamma \pm \sqrt{\gamma ^2-4(\epsilon )(-2n)}}{2\epsilon }=\frac{\gamma \pm \sqrt{\gamma ^2+8\alpha n}}{2\beta } \end{aligned}$$
where \(\alpha =\epsilon /\gamma ^2\) and \(\beta =\epsilon /\gamma \), and the result follows as above. \(\square \)
Having established the local conditions, we next calculate the number of spinor genera for \(L+\nu \). Recall from (2.6), the number of spinor genera in the genus of the coset is given by
$$\begin{aligned} \left[ J_\mathbb {Q}:\mathbb {Q}^\times \prod _{p\in \Omega }\theta (SO(L_p+\nu ))\right] \end{aligned}$$
where \(J_\mathbb {Q}\) is the set of ideles of \(\mathbb {Q}\) and \(\Omega \) is the set of primes in \(\mathbb {Q}\). From this formula, we see that much like in the case of lattices, \(\mathbb {Z}_p^\times \subseteq \theta (SO(L_p+\nu ))\) for every prime p is sufficient, though certainly not necessary to guarantee that \({\text {gen}}(L+\nu )\) and \({\text {spn}}(L+\nu )\) coincide.

Proposition 3.4

  1. (1)

    If \(m\!\equiv \!2\pmod 4\) and \(m\not \!\equiv \!2\pmod {12}\), then \({\text {spn}}(L\!+\!\nu )\!=\!{\text {gen}}(L+\nu )\).

  2. (2)

    For \(m\equiv 2\mod 12\), there are two spinor genera in the genus of \(L+\nu \).



(1) For primes \(p\not \in T\), it is immediate that \(\mathbb {Z}_p^\times \subseteq \theta (SO(L_p+\nu ))\) since \(L_p+\nu =L_p\cong \langle 1,1,1\rangle \). For primes \(p\in T\), we have \((m-2)=p^k\epsilon \) and \(\frac{m-4}{2}=\gamma \) where \(k\ge 1\) and \(\epsilon ,\gamma \in \mathbb {Z}_p^\times \). Then, in the basis \(\{\nu ,e_1,e_2\}\) we have
$$\begin{aligned} M_p\cong \begin{bmatrix} 3\gamma ^2&p^k\epsilon \gamma&p^k\epsilon \gamma \\ p^k\epsilon \gamma&p^{2k}\epsilon ^2&0\\ p^k\epsilon \gamma&0&p^{2k}\epsilon ^2 \end{bmatrix}, \end{aligned}$$
and by a change of basis to \(\{\nu ,p^k\epsilon \nu -3\gamma e_1,p^k\epsilon \nu -3\gamma e_2\}\) we obtain
From this we clearly see that \(\mathbb {Z}_p[\nu ]\) splits \(M_p\) as an orthogonal summand; in other words, \(M_p\) is the orthogonal sum \(M_p =\mathbb {Z}_p[\nu ]\perp K_p\), where
is a binary modular lattice. From here it follows immediately from [14, Satz 3] that \(\mathbb {Z}_p^\times \subseteq \theta (SO(K_p))\) for odd prime p. When \(p=2\) the result follows from [11, Lemma 1]. On the other hand, setting
$$\begin{aligned} \omega :=\frac{p^k\epsilon }{\gamma }\nu =e_1+e_2+e_3 \end{aligned}$$
the set of vectors \(\{\omega ,\omega -3e_1,\omega -3e_2\}\) form a basis for \(L_p\), and in this basis we obtain
$$\begin{aligned} L_p= \mathbb {Z}_p[\omega ]\perp K_p. \end{aligned}$$
Any isometry \(SO(K_p)\) can be extended to an isometry \(\sigma \in SO(M_p)\) which simultaneously satisfies \(\sigma (\nu )=\nu \) and \(\sigma (L_p)=L_p\), and therefore \(\sigma (L_p+\nu )=L_p+\nu \). Hence \(\sigma \in SO(L_p+\nu )\), from which we may conclude that \(\theta (SO(K_p))\subseteq \theta (SO(L_p+\nu ))\) and hence \(\mathbb {Z}_p^\times \subseteq \theta (SO(L_p+\nu ))\).

Now for any \(\vec {x}=(x_p)\in J_\mathbb {Q}\) we know that \(x_p\) is a unit at almost every prime. Therefore, multiplying by a suitable element of \(a\in \mathbb {Q}^\times \) we can assume \(a\vec {x}=(ax_p)\) is a unit at every prime. Moreover, since for the infinite prime \(\theta (L_{\infty }+\nu )=\theta (SO(V_{\infty }))=\mathbb {R}^{\times ^2}\), we only need to chose a to have the same sign as \(x_\infty \). Chosen in this way, \(a\vec {x}\) is an element in the restricted product.

(2) When \(m\equiv 2\mod 12\), then \(L\cong \langle (m-2)^2,(m-2)^2,(m-2)^2\rangle \) in the basis \(\{e_1,e_2,e_3\}\) and \(\nu =\frac{m-4}{2(m-2)}[e_1+e_2+e_3]\). For primes away from T, we once again know that \(L_p+\nu =L_p\cong \langle 1,1,1\rangle \), and hence \(\mathbb {Z}_p^\times \subseteq \theta (SO(L_p+\nu ))\). Moreover, for primes \(p\ne 3\) in T, the argument from above is still sufficient to show that \(\mathbb {Z}_p^\times \subseteq \theta (SO(L_p+\nu ))\). When \(p=2\) we make one further observation, namely that in this case \(\mathbb {Z}_2^\times = \theta (SO(L_2+\nu ))\). If \(\sigma \in SO(L_2+\nu )\) then we know \(\sigma (\nu )=\nu +x\) for \(x\in L_2\), hence
$$\begin{aligned} Q(\nu )=Q(\sigma (\nu ))=Q(\nu +x)=Q(\nu )+Q(x)+2B(\nu ,x), \end{aligned}$$
by a simple congruence argument we see that no nontrivial x can satisfy this equality. Therefore the only isometries of \(L_2+\nu \) are those fixing \(\nu \), and hence are precisely the isometries of \(K_2\) described above. In particular, it follows from [11, Lemma 1] that \(\mathbb {Z}_2^\times {\mathbb {Q}_2^\times }^2=\theta (SO(K_2))=\theta (SO(L_2+\nu ))\).
When \(p=3\), then we consider the generalized lattice M / L, as defined in [25], which has the orthogonal group
$$\begin{aligned} O(M_3/L_3)=\{\sigma \in O(V_3):\sigma (x)\in x+L_3 \text { for all }x\in M_3\}, \end{aligned}$$
also defined in [25]. An isometry \(\sigma \) is in \(O(M_3/L_3)\) precisely when \(\sigma (L_3)=L_3\) and \(\sigma (\nu )\equiv \nu \mod L_3\). Therefore, from (2.7), we see that \(O(M_3/L_3)=O(L_3+\nu )\) and hence \(SO(M_3/L_3)=SO(L_3+\nu )\). However, from [25, Theorem 2] we know that \(\theta (SO(M_3/L_3))\), and hence \(\theta (SO(L_3+\nu ))\) is generated by pairs of symmetries coming from \(O(M_3/L_3)\). If \(\tau \) is a symmetry in \(O(M_3/L_3)\), then there is some \(\omega =e_1x_1+e_2x_2+e_3x_3\in L_3\) such that
$$\begin{aligned} \tau (y)=\tau _\omega (y)=y-\frac{2B(\omega ,y)}{Q(\omega )}\omega \end{aligned}$$
for every \(y\in L_3\). We may assume that \(x_1,x_2,x_3\in \mathbb {Z}_3\), and without loss of generality, that \(x_1\in \mathbb {Z}_3^\times \). But now
$$\begin{aligned} \tau _\omega (e_1)= & {} e_1-\frac{2B(\omega ,e_1)}{Q(\omega )}\omega =e_1-\frac{2\cdot (m-2)^2}{(m-2)^2(x_1^2+x_2^2+x_3^2)}\omega \\= & {} e_1-\frac{2}{(x_1^2+x_2^2+x_3^2)}\omega \in L_3 \end{aligned}$$
and hence \(x^2+y^2+z^2\not \equiv 0\mod 3\). This means that at least one of \(x_2\) and \(x_3\) is not a unit, without loss of generality, say \(x_3\not \in \mathbb {Z}_3^\times \). On the other hand,
$$\begin{aligned} \tau _\omega (\nu )= & {} \nu -\frac{2B(\omega ,\nu )}{Q(\omega )}\omega =\nu -\frac{(m-4)(m-2) (x_1+x_2+x_3)}{(m-2)^2(x_1^2+x_2^2+x_3^2)}\omega \\= & {} \nu -\frac{(m-4)(x_1+x_2+x_3)}{(m-2)(x_1^2+x_2^2+x_3^2)}\omega \end{aligned}$$
and since \(\tau _\omega (\nu )\equiv \nu \mod L_3\) it must follow that \(x_1+x_2+x_3\equiv 0\mod 3\). Therefore the only possibility is that \(x_2\in \mathbb {Z}_3^\times \) and \(x_1\not \equiv x_2\mod 3\). Therefore, \((m-2)^{-2}Q(\omega )\equiv 2\mod 3\), and consequently \(\theta (SO(M_3/L_3))\), and hence \(\theta (SO(L_3+\nu ))\), contains no nontrivial elements. That is, \(2\not \in \theta (SO(L_3+\nu ))\). Finally, we will show that the number of spinor genera in the genus of \(L+\nu \), in this case, is equal to 2. In order to show that
$$\begin{aligned} \left[ J_\mathbb {Q}:\mathbb {Q}^\times \prod _{p\in \Omega }\theta (SO(L_p+\nu ))\right] =2, \end{aligned}$$
we prove that the principal idele 1 and the idele \(\iota \), given by
$$\begin{aligned} \iota _p:={\left\{ \begin{array}{ll} 1 &{} \text {if } p\ne 3,\\ 2 &{}\text {if }p=3,\end{array}\right. } \end{aligned}$$
are inequivalent and the cosets [1] and \([\iota ]\) are a full set of representatives of the quotient space.

For any \(\vec {x}=(x_p)\in J_\mathbb {Q}\), we know that \(x_p\) is a unit for almost every p. Multiplying by a suitable element a in \(\mathbb {Q}^\times \) (where a has the same sign as \(x_\infty \)) if necessary, we may assume that \(ax_p\) is a unit at every prime p (including the infinite prime). Since \(\mathbb {Z}_p^{\times }\subseteq \theta (SO(L_p+\nu ))\) for \(p\ne 3\), the coset of \(\vec {x}\) is completely determined by the congruence class of \(ax_3\). If \(ax_3\equiv 1\mod 3\) then \(\vec {x}\in [1]\) and if \(ax_3\equiv 2\mod 3\) then \(\vec {x}\in [\iota ]\). \(\square \)

Although Proposition 3.4 (1) doesn’t directly lead to a proof of Theorem 1.1, it gives a strong expectation for the results given in Theorem 1.1. Namely, there is a result of Duke and Schulze-Pillot [7] which used the analytic theory to obtain the conclusion in the case of lattices that every sufficiently large integer primitively represented by the spinor genus is also represented by the lattice. Since the lattice and genus coincide by Proposition 3.4 (1), one may expect a result similar to Duke and Schulze-Pillot’s to imply Theorem 1.1. Since no analogous theorem has yet been developed, we turn to a trick in the analytic theory to prove Theorem 1.1.

4 Analytic approach

In this section, we use the analytic proof to show Theorem 1.1, Theorem 1.2 (2), and the first statement of Theorem 1.2 (1). These are rewritten in the following theorem.

Theorem 4.1

Suppose that \(m\not \equiv 0\pmod {4}\). Then we have the following.
  1. (1)
    If \(m\not \equiv 2\pmod {3}\), then every sufficiently large n may be represented in the form
    $$\begin{aligned} n=p_m(x)+p_m(y)+p_m(z) \end{aligned}$$
    for some \(x,y,z\in \mathbb {Z}\). That is to say, \(P_m\) is almost universal.
  2. (2)
    If \(m\equiv 2\pmod {12}\), then every sufficiently large \(n\notin \mathcal {S}_{m,3}^{{\text {e}}}\) may be represented in the form
    $$\begin{aligned} n=p_m(x)+p_m(y)+p_m(z) \end{aligned}$$
    for some \(x,y,z\in \mathbb {Z}\).
  3. (3)
    If \(m\equiv 2\pmod {3}\) is odd, then every sufficiently large \(n\notin \mathcal {S}_{m,3}^{{\text {o}}}\) may be represented in the form
    $$\begin{aligned} n=p_m(x)+p_m(y)+p_m(z) \end{aligned}$$
    for some \(x,y,z\in \mathbb {Z}\).


We split the proof into four pieces. First we assume that \(m\equiv 2\pmod {4}\) and then split depending on the congruence class of m modulo 3, and we will later assume that m is odd.

By completing the square, a solution to the given representation is equivalent to a solution to
$$\begin{aligned} 2(m-2)n+3\left( \frac{m-4}{2}\right) ^2&= \left( (m-2)x-\frac{m-4}{2}\right) ^2+\left( (m-2)y-\frac{m-4}{2}\right) ^2\\&\quad +\left( (m-2)z-\frac{m-4}{2}\right) ^2. \end{aligned}$$
We set \(N:=(m-2)\) and \(\ell =\ell _n:=2(m-2)n+3\left( \frac{m-4}{2}\right) ^2\). Denoting by \(r_{m}(\ell )\) the number of such solutions (with \(r_m(\ell ):=0\) if \(\ell \) is not in the correct congruence class), we hence consider the generating function
$$\begin{aligned} \Theta _m(\tau ):=\sum _{n\ge 0} r_{m}\left( \ell _n\right) q^{\ell _n}, \end{aligned}$$
where \(q:=e^{2\pi i \tau }\). The function \(\Theta _m\) is a theta series for a lattice coset. Since the gram matrix \(A=N^2\cdot I_3\) associated to the lattice is diagonal with even entries, [22, Proposition 2.1] (with \(P(m)=1\), \(\tau \mapsto 2N\tau \), and \(h=((m-4)/2,(m-4)/2,(m-4)/2)^T\)) implies that \(\Theta _m\) is a weight 3 / 2 modular form on \(\Gamma _1(4N^2)\) with some multiplier. As usual, we decompose
$$\begin{aligned} \Theta _m(\tau )=\mathcal {E}_m(\tau )+\mathcal {U}_m(\tau )+f_m(\tau ), \end{aligned}$$
where \(\mathcal {E}_m\) is in the space spanned by Eisenstein series, \(\mathcal {U}_m\) is in the space spanned by unary theta functions, and \(f_m\) is a cusp form which is orthogonal to unary theta functions. Of course, each term in the decomposition is modular of weight 3 / 2 on \(\Gamma _1(4N^2)\) with the same multiplier.

We now follow an argument of Duke and Schulze-Pillot [7], who proved that sufficiently large integers are primitively represented by quadratic forms if and only if they are primitively represented by the spinor genus of the quadratic form (i.e., they investigated the coefficients of theta series with \(\Theta _m\) replaced with the theta series for a lattice). By work of Duke [6], the Fourier coefficients of \(f_m\) grow at most like \(\ell ^{3/7+\varepsilon }\), while the coefficients of \(\mathcal {E}_m\) are certain class numbers and by Siegel’s (ineffective) bound [24] for class numbers, they grow like \(\gg \ell ^{1/2-\varepsilon }\) for any \(\ell \) supported on the coefficients of \(\mathcal {E}_m\) and which are primitively represented by the genus. The requirement that the representations are primitive comes from the fact that there are certain primes p for which the \(p^r\ell \)-th coefficients of Eisenstein series do not grow as a function of r; this phenomenon is explained on the algebraic side in the case of lattices by realizing p as an anisotropic prime. When the power of such primes is bounded, the coefficients of \(\mathcal {E}_{m}\) grow faster than the coefficients of \(f_m\). We may hence disregard \(f_m\) completely whenever the \(\ell \)-th coefficient is not supported in \(\mathcal {U}_m\) and the power of bad primes p dividing \(\ell \) is bounded. However, Shimura [23] used the Siegel–Weil formula for inhomogeneous quadratic forms (i.e., quadratic polynomials) to show that \(\mathcal {E}_m\) is the weighted average of representations by members of the genus of the lattice coset and simultaneously the product of the local densities. For \(p\mid m-2\) with \(p\ne 3\), the power of p dividing \(\ell \) for \(p\mid m-2\) is bounded from above by the congruence conditions. Similarly, if \(\text {ord}_3(m-2)> 1\), then \(\text {ord}_3(\ell )\) is bounded. In the special case that \(\text {ord}_3(m-2)=1\), we note that \(X^2+Y^2+Z^2\equiv 0\pmod {3}\) implies that either 3 divides each of X, Y, and Z or none of them. Hence, in this case, the local density at 3 for representations of \(\ell \) by the lattice coset equals the local density at 3 corresponding to the number of primitive representations by the lattice. Since 3 is not an anisotropic prime for the lattice \(\langle 1,1,1\rangle \), we conclude that the local densities grow as expected. Since \(L_p+\nu =L_p\) for \(p \not \mid m-2\) by Lemma 3.2, the coefficients of \(\mathcal {E}_m\) grow \(\gg \ell ^{\frac{1}{2}-\varepsilon }\) whenever they are represented (due to the fact that \(\ell \) is primitively represented by the lattice). Hence the congruence conditions for \(\mathcal {E}_m\) are equivalent to checking that the integer is represented locally, or in other words that the genus represents the given integer, which follows immediately from Lemma 3.3.

We claim furthermore that \(\mathcal {U}_m\) is identically zero, from which the claim will follow. We may decompose \(\mathcal {U}_m(\tau )\) into a linear combination of finitely many unary theta functions (defined in (2.11)). The goal now is to determine the possible \(\vartheta _{h,t}\) in the decomposition with non-zero coefficient. We do so by restricting the possible choices of t with congruence conditions on \(tr^2\) implied by the definition of \(\Theta _m\). The \(\ell \) upon which the coefficients of \(q^{\ell }\) in \(\vartheta _{h,t}\) are supported must satisfy
$$\begin{aligned} \ell =tr^2 \equiv 0\pmod {t}. \end{aligned}$$
However, the coefficients of the unary theta function are supported on the same integers as the original theta series \(\Theta _m\), since the Eisenstein series are also supported on these coefficients and there would hence otherwise be integers \(\ell \) upon which the coefficient of \(\Theta _m\) is negative, contradicting the fact that it is a generating function for the non-negative integers \(r_{m}(\ell )\). Therefore, we conclude that
$$\begin{aligned} 2(m-2)n+3\left( \frac{m-4}{2}\right) ^2=\ell \equiv 0\pmod {t}. \end{aligned}$$
Since \(2(m-2)\) is even and \(3\left( (m-4)/2\right) ^2\) is odd, we conclude that t must be odd. The congruence then becomes
$$\begin{aligned} 3\left( \frac{m-4}{2}\right) ^2\equiv 0\pmod {t}, \end{aligned}$$
where t is some divisor of (the odd part of) \(m-2\). Rewritten, this implies that
$$\begin{aligned} t\; \Big | \left( m-2,3\left( \frac{m-4}{2}\right) ^2\right) . \end{aligned}$$
Now note that if \(p\mid m-2\) and \(p\mid m-4\), then
$$\begin{aligned} p\mid m-2-(m-4)=2\implies p=2. \end{aligned}$$
Thus, since \((m-4)/2\) is odd,
$$\begin{aligned} \left( m-2,3\left( \frac{m-4}{2}\right) ^2\right) =(m-2,3). \end{aligned}$$
We now split the proof into two cases to prove (1) and (2).
To prove (1) for m even, we assume that \(m\not \equiv 2\pmod {3}\), so
$$\begin{aligned} t\mid (m-2,3)=1. \end{aligned}$$
We conclude that \(t=1\). However, since \(m-2\) is even and \((m-4)/2\) is odd, we also have
$$\begin{aligned} \ell= & {} \left( (m-2)x+\frac{m-4}{2}\right) ^2+\left( (m-2)y+\frac{m-4}{2}\right) ^2\\&\quad +\left( (m-2)z+\frac{m-4}{2}\right) ^2\equiv 3\pmod {8}. \end{aligned}$$
In particular, \(\ell =tr^2\equiv 3\pmod {8}\) implies that \(t=1\) is impossible. Since there are no possible choices of t, we conclude that \(\mathcal {U}_m=0\). This gives the first claim in the case \(m\equiv 2\pmod {4}\).
To prove (2), we assume that \(m\equiv 2\pmod {3}\) (i.e., \(m\equiv 2\pmod {12}\)), so that
$$\begin{aligned} t\mid (m-2,3)=3 \end{aligned}$$
implies that \(t=1\) or \(t=3\). The case \(t=1\) is again impossible by the congruence condition modulo 8 considered in part (1). It follows that \(\mathcal {U}_m\) is a linear combination of forms all of which have \(t=3\). Hence every n sufficiently large for which the corresponding \(\ell \) is not of the form \(3r^2\) must be represented as the sum of three m-gonal numbers.
We now consider the case m odd. In this case,
$$\begin{aligned} n=p_m(x)+p_m(y)+p_m(z) \end{aligned}$$
is equivalent to
$$\begin{aligned} 8n(m-2)+3(m-4)^2= & {} \left( 2(m-2)x+(m-4)\right) ^2 + \left( 2(m-2)y+(m-4)\right) ^2 \nonumber \\&+\left( 2(m-2)z+(m-4)\right) ^2. \end{aligned}$$
Letting \(R_{m}(\ell )\) be the number of solutions to (4.3) with \(\ell =\ell _n:=8n(m-2)+3(m-4)^2\), by [22, Proposition 2.1] we see that
$$\begin{aligned} \Theta _m'(\tau ):=\sum _{n\ge 0} R_{m}\left( \ell _n\right) q^{\frac{\ell _n}{4N}} \end{aligned}$$
is a weight 3 / 2 modular form on \(\Gamma _1(4N^2)\) with some multiplier. Here \(N=(m-2)\), as in the \(m\equiv 2\pmod {4}\) case above. Firstly, Lemma 3.3 implies that \(\ell _n\) is represented locally, or equivalently, by the genus of the lattice coset. We conclude that the relevant coefficients of the Eisenstein series \(\mathcal {E}_m'\) in the decomposition (4.2) are positive and it remains to again determine the unary theta functions \(\vartheta _{h,t,2N}\) which may occur in the decomposition (4.2). Arguing as before, we have \(\ell \equiv 0\pmod {t}\) and \(t\mid 2N\). However, since m is odd, \(m-4\) is also odd, so \(\ell \equiv 3\pmod {8}\). It follows that t is odd, and hence \(t\mid N\). We conclude that
$$\begin{aligned} t\mid \left( m-2, 3(m-4)^2\right) . \end{aligned}$$
Since \((m-2,m-4)=1\), we conclude that \(t\mid (m-2,3)\).

Now we complete the proof of (1) when m is odd. If \(m\not \equiv 2\pmod {3}\), then necessarily \(t=1\). However, \(\ell \equiv 3\pmod {8}\) implies that \(\ell \) is not a square, and hence \(t=1\) is impossible.

To prove (3), we assume m is odd and \(m\equiv 2\mod 3\). Then, since t is a divisor of 1 or 3, we conclude that \(t=1\) or \(t=3\). However, \(t=1\) is again impossible because \(\ell _n\equiv 3\pmod {8}\) (as defined before the definitions of \(\Theta _m\) and \(\Theta _m'\) above) for every \(n\in \mathbb {N}_0\). Therefore we have \(t=3\) and the only possible exceptions are in the square class \(3\mathbb {Z}^2\). \(\square \)

5 Linking the analytic and algebraic theories and forms which are not almost universal

In this section, we prove Proposition 1.4 and Theorem 1.5, establishing that \(P_{m}\) is not almost universal for all \(m\equiv 2\pmod {12}\). We draw on intuition from Proposition 3.4 to both motivate the proof of Theorem 1.5 and explain the statement. For \(m\equiv 2\pmod {4}\) but \(m\not \equiv 2\pmod {12}\), Proposition 3.4 (1) implies that there is only one spinor genus in the genus, and we proved in Theorem 1.1 that \(P_m\) is indeed almost universal in this case. On the other hand, for \(m\equiv 2\pmod {12}\), Proposition 3.4 (2) implies that there are two spinor genera. It is hence natural to search for “primitive spinor exceptions” for the lattice coset by studying whether there are families of exceptions in certain square classes; from the point of view of modular forms, we are searching for the component of the cuspidal part coming from unary theta functions, and Proposition 1.4 gives us a way to discover a unary theta function.

In order to prove Proposition 1.4, we explicitly determine the genus and spinor genus of a lattice coset. Let \(L+\nu \) be the lattice coset associated to \(P_{14}\) as in Sect. 3. That is to say, \(L:=\langle 12^2,12^2,12^2\rangle \) and \(\nu := \frac{5}{12}(e_1+e_2+e_3)\).

Lemma 5.1

  1. (1)
    $$\begin{aligned} \mu :=\frac{1}{12}\left( 5e_1+e_2+e_3\right) , \end{aligned}$$
    the classes in the genus of \(L+\nu \) are then represented by \(L+\nu \), \(L+5\nu \), \(L+\mu \), and \(L+5\mu \).
  2. (2)

    The cosets \(L+\nu \) and \(L+\mu \) form one spinor genus and the cosets \(L+5\nu \) and \(L+5\mu \) form the other spinor genus.



(1) Suppose that \(M+\mu '\in \mathbb {G}(L+\nu )\). The conductor, c, as defined in [10], is the smallest positive integer for which \(c\nu \in L\), or equivalently,
$$\begin{aligned} c=\prod _p[L_p+\mathbb {Z}_p[\nu ]:L_p]=12. \end{aligned}$$
Since any local isometry from \(L_p+\nu \) to \(M_p+\mu '\) must send \(M_p\) to \(L_p\), the conductor is an invariant of the genus and hence c is also the minimal positive integer for which \(c\mu '\in M\). Moreover, since \(M_p\cong L_p\) at every prime p it must follow that \(M\cong L\) since L has class number 1. Therefore each class in the genus of \(L+\nu \) contains a coset of the form \(L+\mu '\), and it just remains to determine the possible values of \(\mu '\). From here, given that the conductor of the genus is \(c=12\), enumerating the possibilities yields a finite set of possibilities for the class representatives in the genus. Many of these classes are immediately seen not to be in the same genus as \(L+\nu \) simply by comparing the numbers locally represented by these classes. We further restrict the set by explicitly finding elements of SO(V) between different cosets. From this, one concludes that the representatives for the classes are a subset of the four claimed lattice cosets. Furthermore, one easily checks that the theta functions of the four cosets are different (i.e., they each represent integers a different number of times), from which one concludes that they cannot be equivalent under the action of SO(V). Finally, we construct \(\sigma \in SO_{\mathbb {A}}(V)\) mapping each of the cosets to each other.
For \(p\ne 2,3\), we have \(\nu ,\mu \in L_p\) and hence
$$\begin{aligned} L_p+5\nu&=L_p=L_p+\nu ,\\ L_p+5\mu&=L_p=L_p+\mu , \end{aligned}$$
so the identity map suffices in this case. When \(p=2\), we observe that \(4\nu =\frac{5}{3}(e_1+e_2+e_3)\in L_2\) and \(4\mu =\frac{1}{3}(5e_1+e_2+e_3)\in L_2\), so that
$$\begin{aligned} \nu&=-\,4\nu +5\nu \in L_2+5\nu ,\\ \mu&= -\,4\mu + 5\mu \in L_2+5\mu , \end{aligned}$$
and \(\frac{5}{3}e_1\in L_2\) implies that
$$\begin{aligned} \nu =\frac{5}{12}(e_1+e_2+e_3)=5\mu -\frac{5}{3}(e_1)\in L_2+5\mu , \end{aligned}$$
implying \(L_2+5\mu = L_2+\mu = L_2+\nu =L_2+5\nu \). When \(p=3\), then we consider the symmetries \(\tau _{e_i}\) of \(L_3\) which negate the vector \(e_i\), and the symmetry \(\tau _{e_2-e_3}\) which switch \(e_2\) and \(e_3\) and fix everything else. Then
$$\begin{aligned} \tau _{e_2}\circ \tau _{e_3}(\nu )=\frac{5}{12}(e_1-e_2-e_3)=\mu -\frac{1}{2}(e_2+e_3) \end{aligned}$$
so \(L_3+\nu \cong L_3+\mu \) and the same isometry can be used to show that \(L_3+5\nu \cong L_3+5\mu \).
$$\begin{aligned} \tau _{e_1}\circ \tau _{e_2-e_3}(\mu )=\tau _{e_1}(\mu )=\frac{1}{12}(-5e_1+e_2+e_3)=5\nu -\frac{5}{2}e_1-2e_2-2e_3, \end{aligned}$$
and hence \(L_3+\mu \) is isometric to \(L_3+5\nu \). From here we conclude that \(L+\nu \), \(L+5\nu \), \(L+\mu \) and \(L+5\mu \) are in the same genus.
(2) By Proposition 3.4 (2), there are precisely 2 spinor genera in the genus of \(L+\nu \). Now it only remains to find representatives for the classes in the two spinor genera. To do this, we need only find a map \(\sigma =(\sigma _2,\sigma _3,...,\sigma _p,...)\in O'_\mathbb {A}(V)\) for which \(\sigma _p(L_p+\nu )=L_p+\mu \) at every prime p. For primes away from 2 and 3 we have
$$\begin{aligned} L_p+\mu =L_p=L_p+\nu , \end{aligned}$$
and so we can let \(\sigma _p\) be the identity map for \(p\ne 2,3\). Moreover, when \(p=2\), then
$$\begin{aligned} \nu =\mu +\frac{1}{3}e_2+\frac{1}{3}e_3 \end{aligned}$$
so in fact \(L_2+\nu =L_2+\mu \), and hence \(\sigma _2\) can also be taken to be the identity map. When \(p=3\) we consider the symmetries \(\tau _{e_2}\) and \(\tau _{e_3}\), then
$$\begin{aligned} \tau _{e_2}\circ \tau _{e_3}(\nu )=\frac{5}{12}(e_1-e_2-e_3)=\mu -\frac{1}{2}e_2-\frac{1}{2}e_3, \end{aligned}$$
and therefore we let \(\sigma _3=\tau _{e_2}\circ \tau _{e_3}\). Then clearly \(\sigma \) is in the kernel of the adelic spinor norm map, since \(Q(e_2)=Q(e_3)\), and this map sends \(L+\nu \) to \(L+\mu \). A similar argument can be used to show that \(L+5\nu \) and \(L+5\mu \) are representatives for the two classes in the spinor genus of \(L+5\nu \). \(\square \)

Proof of Proposition 1.4

The number of automorphs of either \(L+\nu \) or \(L+5\nu \) is 6, while the number of automorphs of either \(L+\mu \) or \(L+5\mu \) is 2. Thus we conclude by Lemma 5.1 that
$$\begin{aligned} \Theta _{{\text {spn}}(L+\nu )}= \frac{3}{2}\left( \frac{\Theta _{L+\nu }}{6} + \frac{\Theta _{L+\mu }}{2}\right) \end{aligned}$$
$$\begin{aligned} \mathcal {E}_{(L+\nu )}=\Theta _{{\text {gen}}(L+\nu )} = \frac{3}{4}\left( \frac{\Theta _{L+5\nu }}{6} + \frac{\Theta _{L+5\mu }}{2}+\frac{\Theta _{L+\nu }}{6} + \frac{\Theta _{L+\mu }}{2}\right) . \end{aligned}$$
We claim that
$$\begin{aligned} \Theta _{{\text {spn}}(L+\nu )}(\tau ) = \Theta _{{\text {gen}}(L+\nu )}(\tau ) -\frac{1}{8}\vartheta _{1,3,12}(\tau ), \end{aligned}$$
which would imply the claim. Both sides are modular forms of weight 3 / 2 on \(\Gamma _1(4\cdot 12^2)\) with the usual \(\Theta ^3\)-multiplier.
Recall now that by the valence formula, a modular form of weight k for \(\Gamma \subseteq {\text {SL}}_2(\mathbb {Z})\) with some multiplier is uniquely determined by the first
$$\begin{aligned} \frac{k}{12}[{\text {SL}}_2(\mathbb {Z}):\Gamma ] \end{aligned}$$
Fourier coefficients, where \([{\text {SL}}_2(\mathbb {Z}):\Gamma ]\) is the index of \(\Gamma \) in \({\text {SL}}_2(\mathbb {Z})\). Since (cf. [16, p. 2])
$$\begin{aligned} \left[ {\text {SL}}_2(\mathbb {Z}):\Gamma _1(N)\right] =N^2\prod _{p\mid N}\left( 1-\frac{1}{p^2}\right) , \end{aligned}$$
we have
$$\begin{aligned} \left[ {\text {SL}}_2(\mathbb {Z}):\Gamma _1(24^2)\right] =24^4\left( 1-\frac{1}{4}\right) \left( 1-\frac{1}{9}\right) = 221184. \end{aligned}$$
Hence we only need to check \(\frac{3}{24}\cdot 221184 =27648\) Fourier coefficients to verify (5.2). This is easily verified with a computer by computing the relevant theta series. \(\square \)

In order to prove Theorem 1.5, we use the \(m=14\) case as a springboard from which the other cases follow. In particular, we show the following theorem.

Theorem 5.2

  1. (1)
    If \(\ell \equiv 1\pmod {12}\) is an odd prime, then
    $$\begin{aligned} X^2+Y^2+Z^2=3\ell ^2 \end{aligned}$$
    has no solutions in \(X,Y,Z\in \mathbb {Z}\) with \(X\equiv Y\equiv Z\equiv 5\pmod {12}\).
  2. (2)
    If \(\ell \equiv 7\pmod {12}\) is an odd prime, then
    $$\begin{aligned} X^2+Y^2+Z^2=3\ell ^2 \end{aligned}$$
    has no solutions in \(X,Y,Z\in \mathbb {Z}\) with \(X\equiv Y\equiv Z\equiv 1\pmod {12}\).


(1) As in the proof of Proposition 1.4 (and as in Sect. 3), we let \(L+\nu \) be the lattice coset associated to \(P_{14}\). The claim is equivalent to the statement that \(L+\nu \) does not represent \(3\ell ^2\) for all \(\ell \equiv 1\pmod {12}\). Since Conjecture 1.3 is true for the spinor genus of \(L+\nu \) by Proposition 1.4 and the Fourier coefficients of each \(\Theta _{M+\nu '}\) are non-negative, the \(3\ell ^2\)-th coefficient of the theta function \(\Theta _{{\text {spn}}(L+\nu )}\) is zero if and only if the \(3\ell ^2\)-th coefficient of \(\Theta _{M+\nu '}\) is zero for all \(M+\nu '\in \mathbb {S}(L+\nu )\). In particular, this implies that if the \(3\ell ^2\)-th coefficient of \(\Theta _{{\text {spn}}(L+\nu )}\) always vanishes, then the claim is true.

We next show that these coefficients of \(\Theta _{{\text {spn}}(L+\nu )}\) do indeed vanish. In order to show this, we explicitly compute the Eisenstein series \(\Theta _{{\text {gen}}(L+\nu )}=\mathcal {E}_{{\text {gen}}(L+\nu )}\) and the linear combination of unary theta functions \(\mathcal {U}_{{\text {spn}}(L+\nu )}\). By (5.2), we have
$$\begin{aligned} \mathcal {U}_{{\text {spn}}(L+\nu )}=-\frac{1}{8}\vartheta _{1,3,12}. \end{aligned}$$
We next use (5.1) to compute the Eisenstein series component \(\mathcal {E}_{{\text {gen}}(L+\nu )}\). To ease notation, we define the sieve operator \(S_{N,\ell }\), acting on Fourier expansions \(f(\tau )=\sum _{n\ge 0 }a_f(n) q^n\) by
$$\begin{aligned} f|S_{N,\ell }(\tau ):=\sum _{\begin{array}{c} n\ge 0\\ n\equiv \ell \pmod {N} \end{array}} a_f(n)q^n. \end{aligned}$$
Then a straightforward elementary calculation (by splitting the representations \(x^2+y^2+z^2=24n+3\) via the congruence classes of x, y, and z) yields
$$\begin{aligned} \Theta ^3\big |S_{24,3}(\tau )= 48\left( \frac{\Theta _{L+5\nu }(\tau )}{6} + \frac{\Theta _{L+5\mu }(\tau )}{2}+\frac{\Theta _{L+\nu }(\tau )}{6} + \frac{\Theta _{L+\mu }(\tau )}{2}\right) + 8\Theta ^3(3\tau )\big |S_{24,3}. \end{aligned}$$
Hence by (5.1), we have
$$\begin{aligned} \mathcal {E}_{{\text {gen}}(L+\nu )}=\frac{1}{64}\left( \Theta ^3\big |S_{24,3}(\tau )-\frac{1}{8}\Theta ^3(3\tau )\big |S_{24,3}\right) \end{aligned}$$
In particular, the \(3\ell ^2\)-th coefficient of \(\mathcal {E}_{{\text {gen}}(L+\nu )}\) is exactly the number of ways to write \(3\ell ^2\) as the sum of 3 squares. By [12, Theorem 86], since the quadratic form \(Q(x,y,z)=x^2+y^2+z^2\) has class number 1, this coefficient is given by
$$\begin{aligned} 24H\left( 3\ell ^2\right) , \end{aligned}$$
$$\begin{aligned} H(d):=\sum _{\begin{array}{c} f\in \mathbb {N}\\ -\frac{d}{f^2}\equiv 0,1\pmod {4} \end{array}}\frac{h\left( -\frac{d}{f^2}\right) }{u\left( -\frac{d}{f^2}\right) } \end{aligned}$$
denotes the Hurwitz class number, with h(D) denoting the usual class number and u(D) being half the size of the automorphism group of the order of discriminant D in \(\mathbb {Q}(\sqrt{D})\).
However, for \(d=3\ell ^2\), the class number formula [5, Corollary 7.28, page 148] and \(h(-3)=1\) (as well as the fact that \(u(-3)=3\) and \(u(-3r^2)=1\) for \(r>1\)) imply that (for \(\ell \) prime)
$$\begin{aligned} H\left( 3\ell ^2\right) = \frac{h(-3)}{3} + h\left( -3\ell ^2\right) = \frac{1}{3}+ \frac{1}{3}\left( \ell -\left( \frac{-3}{\ell }\right) \right) = \frac{1}{3}\left( \ell +1-\left( \frac{-3}{\ell }\right) \right) . \end{aligned}$$
Here \((-3/\ell )\) is the Kronecker–Jacobi–Legendre symbol, which for \(\ell \equiv 1\pmod {3}\) is 1 in particular. Thus for prime \(\ell \equiv 1\pmod {3}\), the coefficient of \(3\ell ^2\) in \(\mathcal {E}_{{\text {gen}}(L+\nu )}\) is
$$\begin{aligned} \frac{1}{64}\cdot 24 \cdot \frac{\ell }{3}= \frac{\ell }{8}. \end{aligned}$$
At the same time,
$$\begin{aligned} \vartheta _{1,3,12}(\tau )= \sum _{\begin{array}{c} n\in \mathbb {Z}\\ n\equiv 1\pmod {4} \end{array}} n q^{3n^2} = \sum _{n\ge 0} \left( \frac{-4}{n}\right) n q^{3n^2}. \end{aligned}$$
Thus the \(3n^2\)-th coefficient of \(\vartheta _{1,3,12}(\tau )/8\) is \(\left( \frac{-4}{n}\right) n/8\). For \(n=\ell \equiv 1\pmod {4}\), we specifically have \(\ell /8\), which cancels with the coefficient from \(\mathcal {E}_{{\text {gen}}(L+\nu )}\). Hence by Proposition 1.4 (in particular, see (5.2)), the \(3\ell ^2\)-th coefficient of \(\Theta _{{\text {spn}}(L+\nu )}\) is zero. This yields the claim.
(2) We argue similarly to part (1), except this time we use the lattice coset \(L+5\nu \) instead of \(L+\nu \) (the statement is a rewording of the claim that \(L+5\nu \) does not represent any integer of the form \(3\ell ^2\) with \(\ell \equiv 7\pmod {12}\) prime). The classes in the spinor genus of \(L+5\nu \) are given by \(L+5\nu \) and \(L+5\mu \). Moreover, by (5.1) we have
$$\begin{aligned} \Theta _{{\text {gen}}(L+5\nu )}=\Theta _{{\text {gen}}(L+\nu )}= \frac{1}{2}\left( \Theta _{{\text {spn}}(L+\nu )}+\Theta _{{\text {spn}}(L+5\nu )}\right) . \end{aligned}$$
Rearranging and plugging in (5.2), we have
$$\begin{aligned} \Theta _{{\text {spn}}(L+5\nu )} = 2\Theta _{{\text {gen}}(L+\nu )} -\Theta _{{\text {spn}}(L+\nu )} \overset{(5.2)}{=} \Theta _{{\text {gen}}(L+\nu )}+\frac{1}{8}\vartheta _{1,3,12}(\tau ). \end{aligned}$$
We then use (5.3) and (5.5) to compute the \(3\ell ^2\)-th coefficient of each side. For \(\ell \equiv 7\pmod {12}\) prime, we have \((-\,3/\ell )=1\) so that (5.4) yields that the \(3\ell ^2\)-th coefficient of the Eisenstein series \(\Theta _{{\text {gen}}(L+\nu )}\) is precisely \(\ell /8\). Since \((-\,4/\ell )=-\,1\) for \(\ell \equiv 7\pmod {12}\), the coefficient of \(\vartheta _{1,3,12}(\tau )/8\) is \(-\,\ell /8\), giving cancellation. We conclude that the spinor genus of \(L+5\nu \) does not represent \(3\ell ^2\) by Proposition 1.4. \(\square \)

We are now ready to prove Theorem 1.5.

Proof of Theorem 1.5

For \(m\equiv 2\pmod {12}\), we write \(m=12r+2\). We claim that, in particular, \(P_m\) does not represent n whenever
$$\begin{aligned} 2(m-2)n + 3\left( \frac{m-4}{2}\right) ^2 = 3\ell ^2, \end{aligned}$$
where \(\ell \) is any prime satisfying
$$\begin{aligned} {\left\{ \begin{array}{ll} \ell \equiv 1\pmod {12} &{} \text {if}~r~\text {is odd},\\ \ell \equiv 7\pmod {12} &{} \text {if}~r~\text {is even}. \end{array}\right. } \end{aligned}$$
Note first that \(P_m\) represents n if and only if there exist \(x,y,z\in \mathbb {Z}\) such that
$$\begin{aligned} 24rn+3(6r-1)^2&= 2(m-2)n+3\left( \frac{m-4}{2}\right) ^2 =\left( (m-2)x+\frac{m-4}{2}\right) ^2 \nonumber \\&\quad +\left( (m-2)y+\frac{m-4}{2}\right) ^2+\left( (m-2)z+\frac{m-4}{2}\right) ^2\nonumber \\&= \left( 12rx+6r-1\right) ^2+\left( 12ry+6r-1\right) ^2+\left( 12rz+6r-1\right) ^2. \end{aligned}$$
Notice that since \((6r-1)^2\equiv 1\pmod {24}\), the left hand side of (5.7) is congruent to 3 modulo 24, so we may write it in the shape \(24n'+3\) for some \(n'\). Writing \(X:=12rx+6r-1\), \(Y:=12ry+6r-1\), and \(Z:=12rz+6r-1\), if (5.7) holds, then there hence exist \(X,Y,Z\in \mathbb {Z}\) with \(X\equiv Y\equiv Z\equiv 6r-1 \pmod {12}\) for which \(X^2+Y^2+Z^2=24n'+3\). In particular, if \(24n'+3=3\ell ^2\) with \(\ell \) a prime satisfying (5.6), then Theorem 5.2 implies that (5.7) is not solvable.
Therefore \(P_m\) is not almost universal if there are infinitely many primes \(\ell \) satisfying (5.6) for which \(3\ell ^2\) is in the set
$$\begin{aligned} \mathcal {S}:=\left\{ 2(m-2)n+3\left( \frac{m-4}{2}\right) ^2: n\in \mathbb {N}_0\right\} =\left\{ 24rn+3(6r-1)^2: n\in \mathbb {N}_0\right\} . \end{aligned}$$
Hence, we need to find infinitely many \(\ell \) satisfying (5.6) and \(3\ell ^2\equiv 3\pmod {24r}\), or in other words, we want \(\ell ^2\equiv 1\pmod {8r}\) and \(\ell \equiv 1\pmod {12}\) if r is odd and \(\ell \equiv 7\pmod {12}\) if r is even. For r odd, we take \(\ell \equiv 1\pmod {12r}\) sufficiently large. For \(r=2^a3^br'\) with \(a>0\), we require \(\ell \equiv 7\pmod {12}\) and \(\ell ^2\equiv 1\pmod {8r}\). By the Chinese Remainder Theorem and Hensel’s Lemma, there are infinitely many \(\ell \equiv 1\pmod {r'}\), \(\ell \equiv 1\pmod {3^{b+1}}\), and \(\ell \equiv -1\pmod {4}\) such that \(\ell ^2\equiv 1\pmod {2^{3+a}}\), and these \(\ell \) satisfy the desired congruences. Therefore, there are infinitely many \(\ell \) satisfying (5.6) for which \(3\ell ^2\in \mathcal {S}\) by the existence of infinitely many primes in arithmetic progressions. Each such \(\ell \) corresponds to some n which is not represented by \(P_m\), yielding the claim. \(\square \)


Author's contributions

Per standard mathematical collaboration, all calculations were carried out and checked by both authors. Both authors read and approved the final manuscript.


The authors thank Wai Kiu Chan for helpful discussion and Rainer Schulze-Pillot for pointing out the work of van der Blij [26] and Kneser [15] related to the Siegel–Weil formula for shifted lattices after seeing a preliminary version of this paper. The authors also thank the anonymous referee for many corrections and also suggestions that improved the exposition of the paper. The research of the second author was supported by grant project numbers 27300314, 17302515, and 17316416 of the Research Grants Council.

Competing interests

The authors declare that they have no competing interests.

Consent for publication

Not applicable.

Ethics approval and consent to participate

Not applicable.

Authors’ Affiliations

Department of Mathematics and Computer Science, Duquesne University, Pittsburgh, USA
Department of Mathematics, University of Hong Kong, Pokfulam, Hong Kong


  1. Cauchy, A.: Démonstration du théorèm général de Fermat sur les nombres polygones. Mém. Sci. Math. Phys. Inst. France 14, 177–220 (1813–1815)Google Scholar
  2. Cauchy, A.: Démonstration du théorèm général de Fermat sur les nombres polygones. Oeuvres Complètes VI, 320–353 (1905)Google Scholar
  3. Chan, W.K., Oh, B.-K.: Almost universal ternary sums of triangular numbers. Proc. Amer. Math. Soc. 137, 3553–3562 (2009)MathSciNetView ArticleMATHGoogle Scholar
  4. Chan, W.K., Oh, B.-K.: Representations of integral quadratic polynomials. Contemp. Math. Am. Math. Soc. 587, 31–46 (2013)Google Scholar
  5. Cox, D.: Primes of the form \(x^2+ny^2\). Wiley, New York (1989)Google Scholar
  6. Duke, W.: Hyperbolic distribution problems and half-integral weight Maass forms. Invent. Math. 92, 73–90 (1988)MathSciNetView ArticleMATHGoogle Scholar
  7. Duke, W., Schulze-Pillot, R.: Representation of integers by positive ternary quadratic forms and equidistribution of lattice points on ellipsoids. Invent. Math. 99(1), 49–57 (1990)MathSciNetView ArticleMATHGoogle Scholar
  8. Earnest, A.G., Hsia, J.S., Hung, D.C.: Primitive representations by spinor genera of ternary quadratic forms. J. Lond. Math. Soc. 50(2), 222–230 (1994)MathSciNetView ArticleMATHGoogle Scholar
  9. Guy, R.K.: Every number is expressible as a sum of how many polygonal numbers? Am. Math. Mon. 101, 169–172 (1994)MathSciNetView ArticleMATHGoogle Scholar
  10. Haensch, A.: A characterization of almost universal ternary quadratic polynomials with odd prime power conductor. J. Number Theory 141, 202–213 (2014)MathSciNetView ArticleMATHGoogle Scholar
  11. Hsia, J.S.: Spinor norms of local integral rotations I. Pac. J. Math. 57(1), 199–206 (1975)MathSciNetView ArticleMATHGoogle Scholar
  12. Jones, B.: The arithmetic theory of quadratic forms, Carcus monograph series 10. Math. Assoc. Am., Buffalo (1950)Google Scholar
  13. Kane, B., Sun, Z.W.: On almost universal mixed sums of squares and triangular numbers. Trans. Am. Math. Soc. 362, 6425–6455 (2010)MathSciNetView ArticleMATHGoogle Scholar
  14. Kneser, M.: Klassenzahlen indefiniter quadratischer Formen in drei oder mehr Veranderlichen. Arch. Math. 7, 323–332 (1956)MathSciNetView ArticleMATHGoogle Scholar
  15. Kneser, M.: Darstellungsmaße indefiniter quadratischer Formen. Math. Z. 77, 188–194 (1961)MathSciNetView ArticleMATHGoogle Scholar
  16. Ono, K.: The web of modularity: arithmetic of the coefficients of modular forms and \(q\)-series. Am. Math. Soc., Providence (2004)MATHGoogle Scholar
  17. O’Meara, O.T.: Introduction to quadratic forms. Springer-Verlag, New York (1963)View ArticleMATHGoogle Scholar
  18. Petersson, H.: Konstruktion der Modulformen und der zu gewissen Grenzkreisgruppen gehörigen automorphen Formen von positiver reeller Dimension und die vollständige Bestimmung ihrer Fourierkoeffzienten, pp. 415–474. S.-B. Heidelberger Akad. Wiss. Math. Nat. Kl., New York (1950)View ArticleMATHGoogle Scholar
  19. Schulze-Pillot, R.: Darstellung durch Spinorgeschlechter ternärer quadratischer Formen. J. Number Theory 12, 529–540 (1980)MathSciNetView ArticleMATHGoogle Scholar
  20. Schulze-Pillot, R.: Darstellungsmaße von Spinorgeschlectern ternärer quadratischer Formen. J. Reine Angew. Math. 352, 114–132 (1984)MathSciNetMATHGoogle Scholar
  21. Schulze-Pillot, R.: Thetareihen positiv definiter quadratischer Formen. Invent. Math. 75, 283–299 (1984)MathSciNetView ArticleMATHGoogle Scholar
  22. Shimura, G.: On modular forms of half-integral weight. Ann. Math. 97, 440–481 (1973)MathSciNetView ArticleMATHGoogle Scholar
  23. Shimura, G.: Inhomogeneous quadratic forms and triangular numbers. Am. J. Math. 126, 191–214 (2004)MathSciNetView ArticleMATHGoogle Scholar
  24. Siegel, C.: Über die analytische Theorie der quadratischen Formen. Ann. Math. 36, 527–606 (1935)MathSciNetView ArticleMATHGoogle Scholar
  25. Teterin, Y.: Spinor norms of local autometries of generalized quadratic lattices. J. Math. Sci. 83(5), 664–672 (1997)MathSciNetView ArticleGoogle Scholar
  26. van der Blij, F.: On the theory of quadratic forms. Ann. Math 50, 875–883 (1949)MathSciNetView ArticleMATHGoogle Scholar
  27. Xu, F.: Strong approximation for certain quadric fibrations with compact fibers. Adv. Math. 281, 279–295 (2015)MathSciNetView ArticleMATHGoogle Scholar


© SpringerNature 2018