- Research
- Open Access

# Almost universal ternary sums of polygonal numbers

- Anna Haensch
^{1}and - Ben Kane
^{2}Email authorView ORCID ID profile

**Received:**7 April 2017**Accepted:**31 October 2017**Published:**31 January 2018

## Abstract

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.

## Keywords

- Sums of polygonal numbers
- Ternary quadratic polynomials
- Almost universal forms
- Theta series
- Lattice theory and quadratic spaces
- Modular forms
- Spinor genus theory

## Mathematics Subject Classification

- 11E20
- 11E25
- 11E45
- 11E81
- 11H55
- 05A30

## 1 Introduction

*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

*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

*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.

### Remarks

- (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)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 typeIn particular, authors worked on the classification of$$\begin{aligned} ap_{m_1}(x)+bp_{m_2}(y)+cp_{m_3}(z). \end{aligned}$$
*a*,*b*,*c*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*a*,*b*,*c*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.

*m*even we define

*m*odd we define

*m*is odd.

### Theorem 1.2

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

- (2)
If \(m\equiv 2\pmod {3}\) and

*m*is odd, then \(\mathcal {S}_m\setminus \mathcal {S}_{m,3}^{{\text {o}}}\) is finite.

*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

*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.

*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

*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.

### Conjecture 1.3

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.

### Theorem 1.5

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

### Remarks

- (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)
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\).

*n*by the sum \(P_m\), which upon completing the square, is seen to be equivalent to the condition that

*class*of \(L+\nu \) is defined as

*spinor genus*of \(L+\nu \) as

*genus*of the lattice coset \(L+\nu \) by

*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].

### 2.2 Setup for the analytic approach: modular forms theory

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

#### 2.2.1 Basic definitions

*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

*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)])

*slash operator*\(|_{r,\nu }\) of weight

*r*and multiplier system \(\nu \) is then

*(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)
The function

*f*is holomorphic on \(\mathbb {H}\). - (2)For every \(\gamma \in \Gamma \), we have$$\begin{aligned} f|_{r,\nu }\gamma = f. \end{aligned}$$(2.8)
- (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 \).

*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

*f*has a Fourier expansion (\(a_{f}(n)\in \mathbb {C}\))

*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

*L*of rank

*n*) and polynomials

*P*on lattice points. Namely, he defined

*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

*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

*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}\))

*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.

### Proof

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 \).

### Proof

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*.

### Proof

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]).

*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

*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

*x*in (3.1) (in the algebraic closure of \(\mathbb {Z}_2\)) is given by

*m*-gonal number, it follows that every \(\ell _n\) is represented by the coset \(L_2+\nu \).

*p*is sufficient, though certainly not necessary to guarantee that \({\text {gen}}(L+\nu )\) and \({\text {spn}}(L+\nu )\) coincide.

### Proposition 3.4

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

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

### Proof

*p*. When \(p=2\) the result follows from [11, Lemma 1]. On the other hand, setting

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.

*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

*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 ))\).

*M*/

*L*, as defined in [25], which has the orthogonal group

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

- (1)If \(m\not \equiv 2\pmod {3}\), then every sufficiently large
*n*may be represented in the formfor some \(x,y,z\in \mathbb {Z}\). That is to say, \(P_m\) is almost universal.$$\begin{aligned} n=p_m(x)+p_m(y)+p_m(z) \end{aligned}$$ - (2)If \(m\equiv 2\pmod {12}\), then every sufficiently large \(n\notin \mathcal {S}_{m,3}^{{\text {e}}}\) may be represented in the formfor some \(x,y,z\in \mathbb {Z}\).$$\begin{aligned} n=p_m(x)+p_m(y)+p_m(z) \end{aligned}$$
- (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 formfor some \(x,y,z\in \mathbb {Z}\).$$\begin{aligned} n=p_m(x)+p_m(y)+p_m(z) \end{aligned}$$

### Proof

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.

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.

*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

*t*must be odd. The congruence then becomes

*t*is some divisor of (the odd part of) \(m-2\). Rewritten, this implies that

*m*even, we assume that \(m\not \equiv 2\pmod {3}\), so

*t*, we conclude that \(\mathcal {U}_m=0\). This gives the first claim in the case \(m\equiv 2\pmod {4}\).

*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.

*m*odd. In this case,

*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

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)Definingthe classes in the genus of \(L+\nu \) are then represented by \(L+\nu \), \(L+5\nu \), \(L+\mu \), and \(L+5\mu \).$$\begin{aligned} \mu :=\frac{1}{12}\left( 5e_1+e_2+e_3\right) , \end{aligned}$$
- (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.

### Proof

*c*, as defined in [10], is the smallest positive integer for which \(c\nu \in L\), or equivalently,

*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.

*p*. For primes away from 2 and 3 we have

### Proof of Proposition 1.4

*k*for \(\Gamma \subseteq {\text {SL}}_2(\mathbb {Z})\) with some multiplier is uniquely determined by the first

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)If \(\ell \equiv 1\pmod {12}\) is an odd prime, thenhas no solutions in \(X,Y,Z\in \mathbb {Z}\) with \(X\equiv Y\equiv Z\equiv 5\pmod {12}\).$$\begin{aligned} X^2+Y^2+Z^2=3\ell ^2 \end{aligned}$$
- (2)If \(\ell \equiv 7\pmod {12}\) is an odd prime, thenhas no solutions in \(X,Y,Z\in \mathbb {Z}\) with \(X\equiv Y\equiv Z\equiv 1\pmod {12}\).$$\begin{aligned} X^2+Y^2+Z^2=3\ell ^2 \end{aligned}$$

### Proof

(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.

*sieve operator*\(S_{N,\ell }\), acting on Fourier expansions \(f(\tau )=\sum _{n\ge 0 }a_f(n) q^n\) by

*x*,

*y*, and

*z*) yields

*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})\).

We are now ready to prove Theorem 1.5.

### Proof of Theorem 1.5

*n*whenever

*n*if and only if there exist \(x,y,z\in \mathbb {Z}\) such that

*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 \)

## Declarations

### 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.

### Acknowlegements

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

## References

- 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
- 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 - Chan, W.K., Oh, B.-K.: Almost universal ternary sums of triangular numbers. Proc. Amer. Math. Soc.
**137**, 3553–3562 (2009)MathSciNetView ArticleMATHGoogle Scholar - Chan, W.K., Oh, B.-K.: Representations of integral quadratic polynomials. Contemp. Math. Am. Math. Soc. 587, 31–46 (2013)Google Scholar
- Cox, D.: Primes of the form \(x^2+ny^2\). Wiley, New York (1989)Google Scholar
- Duke, W.: Hyperbolic distribution problems and half-integral weight Maass forms. Invent. Math.
**92**, 73–90 (1988)MathSciNetView ArticleMATHGoogle Scholar - 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 - 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 - 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 - 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 - Hsia, J.S.: Spinor norms of local integral rotations I. Pac. J. Math.
**57**(1), 199–206 (1975)MathSciNetView ArticleMATHGoogle Scholar - Jones, B.: The arithmetic theory of quadratic forms, Carcus monograph series 10. Math. Assoc. Am., Buffalo (1950)Google Scholar
- 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 - Kneser, M.: Klassenzahlen indefiniter quadratischer Formen in drei oder mehr Veranderlichen. Arch. Math.
**7**, 323–332 (1956)MathSciNetView ArticleMATHGoogle Scholar - Kneser, M.: Darstellungsmaße indefiniter quadratischer Formen. Math. Z.
**77**, 188–194 (1961)MathSciNetView ArticleMATHGoogle Scholar - Ono, K.: The web of modularity: arithmetic of the coefficients of modular forms and \(q\)-series. Am. Math. Soc., Providence (2004)MATHGoogle Scholar
- O’Meara, O.T.: Introduction to quadratic forms. Springer-Verlag, New York (1963)View ArticleMATHGoogle Scholar
- 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
- Schulze-Pillot, R.: Darstellung durch Spinorgeschlechter ternärer quadratischer Formen. J. Number Theory
**12**, 529–540 (1980)MathSciNetView ArticleMATHGoogle Scholar - Schulze-Pillot, R.: Darstellungsmaße von Spinorgeschlectern ternärer quadratischer Formen. J. Reine Angew. Math.
**352**, 114–132 (1984)MathSciNetMATHGoogle Scholar - Schulze-Pillot, R.: Thetareihen positiv definiter quadratischer Formen. Invent. Math.
**75**, 283–299 (1984)MathSciNetView ArticleMATHGoogle Scholar - Shimura, G.: On modular forms of half-integral weight. Ann. Math.
**97**, 440–481 (1973)MathSciNetView ArticleMATHGoogle Scholar - Shimura, G.: Inhomogeneous quadratic forms and triangular numbers. Am. J. Math.
**126**, 191–214 (2004)MathSciNetView ArticleMATHGoogle Scholar - Siegel, C.: Über die analytische Theorie der quadratischen Formen. Ann. Math.
**36**, 527–606 (1935)MathSciNetView ArticleMATHGoogle Scholar - Teterin, Y.: Spinor norms of local autometries of generalized quadratic lattices. J. Math. Sci.
**83**(5), 664–672 (1997)MathSciNetView ArticleGoogle Scholar - van der Blij, F.: On the theory of quadratic forms. Ann. Math
**50**, 875–883 (1949)MathSciNetView ArticleMATHGoogle Scholar - Xu, F.: Strong approximation for certain quadric fibrations with compact fibers. Adv. Math.
**281**, 279–295 (2015)MathSciNetView ArticleMATHGoogle Scholar