ALMOST UNIVERSAL TERNARY SUMS OF POLYGONAL NUMBERS

ANNA HAENSCH AND BEN KANE

Abstract. For a m, generalized m-gonal numbers are those numbers of the form (m−2)x2−(m−4)x pm(x) = 2 with x ∈ Z. In this paper we establish conditions on m for which the ternary sum pm(x) + pm(y) + pm(z) is almost universal.

1. Introduction (m−2)x2−(m−4)x For a natural number m, the xth generalized m-gonal number is given by pm(x) = 2 where x ∈ 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 theorem (the m = 3 case) in 1796, and Cauchy proved the full claim in 1813 [1]. Guy [7] later investigated the minimal number rm ∈ N chosen such that every natural number may be written as the sum of rm generalized m-gonal numbers. For m ≥ 8, Guy noted that an elementary argument shows that one needs m−4 generalized m-gonal numbers to represent m − 4, so m − 4 ≤ rm ≤ m. However, he pointed out that for large enough n ∈ 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 ∈ N is the sum of three m-gonal numbers. That is to say, we study representations of natural numbers by the ternary sum

Pm(x, y, z) := pm(x) + pm(y) + pm(z), and we ask for which m the form Pm is almost universal, that is, when does it represent all but finitely many natural numbers. In other words, we would like to determine the set of m for which the set  3 Sm := n ∈ N :6 ∃(x, y, z) ∈ Z with Pm(x, y, z) = n is finite. The set Sm is those positive integers which are not represented by Pm, and we call Pm almost universal if Sm is finite.

Theorem 1.1. If m 6≡ 2 (mod 3) and 4 - m, then Pm is almost universal. Remarks. (1) Theorem 1.1 proves that for m 6≡ 2 (mod 3) and 4 - 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 [19] for the class numbers of imaginary quadratic orders, so the result does not give an explicit bound nm such that every n > nm may be written as the sum of three generalized m-gonal numbers.

Date: July 22, 2016. 2010 Subject Classification. 11E20, 11E25, 11E45, 11E81, 11H55, 05A30. Key words and phrases. sums of polygonal numbers, ternary quadratic polynomials, almost universal forms, theta , lattice theory and quadratic spaces, modular forms, spinor genus theory. The research of the second author was supported by grant project numbers 27300314, 17302515, and 17316416 of the Research Grants Council. 1 2 ANNA HAENSCH AND BEN KANE

(2) Questions of almost universality have recently been studied by a number of authors, but in a 3 slightly different way. In most cases, (m1, m2, m3) ∈ N≥3 has been fixed and authors investi- gated representations by weighted sums of the type

apm1 (x) + bpm2 (y) + cpm3 (z). In particular, authors worked on the classification of 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 [10], for example, a classification of such a, b, c was given for m1 = m2 = 4 and m3 = 3. In the case of a weighted sum of triangular numbers, a partial answer was given in [10], and the characterization of such almost universal sums was completed by Chan and Oh in [2]. The most general result to date appears in [8], 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 [8] imply that Pm is not almost universal (note that m ≡ 0 (mod 4), so this is partially complementary to the result in Theorem 1.1) It turns out that the restrictions m 6≡ 2 (mod 3) and 4 - m are both necessary in Theorem 1.1, but are of a very different nature. If 4 | m, then there is a local obstruction to Pm being almost universal, i.e., there is an entire congruence class AN0 + B ⊆ Sm because it is not even represented modulo A. Details of these local obstructions may be found in Lemma 3.1. The restriction m 6≡ 2 (mod 3) (with 4 - 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 Sm is not necessarily finite. To get a better understanding of the set Sm, for m even we define ( ) m − 42 Se := n ∈ S : ∃r ∈ with 2(m − 2)n + 3 = 3r2 m,3 m Z 2 and for m odd we define o  2 2 Sm,3 := n ∈ Sm : ∃r ∈ Z with 8(m − 2)n + 3(m − 4) = 3r . e We next see that if m ≡ 2 (mod 3), then most of the exceptional set Sm is contained in Sm,3 if o m ≡ 2 (mod 4) and contained in Sm,3 if m is odd. Theorem 1.2. e (1) If m ≡ 2 (mod 12), then Sm \Sm,3 is finite. o (2) If m ≡ 2 (mod 3) and m is odd, then Sm \Sm,3 is finite. Both the analytic and algebraic approaches are sufficient by themselves to prove Theorem 1.1. e o However, both approaches fail to gain any control in determining the sets Sm,3 and Sm,3. One is hence motivated to blend the two approaches together in order to investigate these sets. From the algebraic point of view, one may relate representations of an integer n by Pm with elements in a shifted lattice coset L + ν of norm An + B for some A ∈ N and B ∈ Z (L is a lattice in a ternary quadratic space and ν is a vector; see Section 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 Pm is replaced with the norm on a ternary lattice L (i.e., the norm is a ternary quadratic form), which we later emulate. To understand the link, for such a lattice L, let SL := {n ∈ N :6 ∃α ∈ L with Q(α) = n}, where Q is the quadratic map in the associated quadratic space. Since L is a lattice, there will always be local obstructions, but our main consideration is those n ∈ SL which are locally represented, which we refer to as locally admissable. Using the analytic theory, one can show that the subset of 2 2 SL which are locally admissible is finite outside of finitely many square classes t1Z , . . . , t`Z . The behavior inside these square classes is explained via the spinor norm map in the algebraic theory; TERNARY SUMS OF POLYGONAL NUMBERS 3

2 this occurs by realizing tjZ as a spinor exceptional square class. The elements of SL within these spinor exceptional square classes was determined by Earnest, Hsia, and Hung [6]. From this one can determine that the subset of admissible elements of SL is infinite if and only if there is at least one spinor exceptional square class. Returning to our case Pm, 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 - m the 2 only possibly infinite part of n ∈ Sm occurs when An + B is within the square class 3Z , 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 L0 in a positive-definite space, let gen(L0) be a set of representatives of the classes in the genus of L0. One version of the Siegel–Weil formula states that

1 X ΘL Egen(L0) := −1 P ω ωL L∈gen(L0) L L∈gen(L0) is a certain Eisenstein series. Here ΘL is the theta function associated to L (i.e., the generating function for the elements of L of a given norm; see (2.9)) and ωL is the number of automorphs of L (i.e., the number of changes of variables over Z which leave L fixed). If L0 has rank 3, then if one instead takes the associated sum over representatives in the spinor genus spn(L0), one obtains

1 X ΘL −1 = Egen(L0) + Uspn(L0), (1.1) P ω ωL L∈spn(L0) L L∈spn(L0) where Uspn(L0) is a linear combination of unary theta functions [15, 16]. The Fourier coefficients of

Uspn(L0) count the excess or deficiency of the weighted average of the number of representations by the spinor genus of L0 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 forms all of whose coefficients are non-negative. Hence if the n coefficient of this sum is zero, then the nth 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 Pm as a question about representations by a particular lattice coset Lm + ν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 + ν was proven by Shimura [18], who showed that

1 X ΘM+ν0 Θ = E := gen(L+ν) gen(L+ν) P −1 0 ω ωM+ν0 M+ν ∈gen(L+ν) M+ν0 M+ν0∈gen(L+ν) is an Eisenstein series, where ωM+ν0 is the number of automorphs of the lattice coset. We conjecture that the expected link holds in the same way for spinor genera of lattice cosets. Conjecture 1.3. We have

1 X ΘM+ν0 Θ := = E + U , spn(L+ν) P −1 gen(L+ν) spn(L+ν) 0 ω ωM+ν0 M+ν ∈spn(L+ν) M+ν0 M+ν0∈spn(L+ν) where Uspn(L+ν) is a linear combination of unary theta functions. 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 4 ANNA HAENSCH AND BEN KANE 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 the functions Pm. In particular, for m = 14, a finite calculation yields the following.

Proposition 1.4. The theta function Θspn(L14+ν14) satisfies Conjecture 1.3. As stated above, one of the main advantages of Proposition 1.4 are that one can use it to show that the Fourier coefficients of Θspn(L14+ν14) usually agree with those of

Em := Egen(Lm+νm). However, we specifically use Proposition 1.4 to investigate the coefficients supported by the unary theta functions to prove that infinitely many coefficients of Θ14 in these square classes vanish, where

Θm := ΘLm+νm .

We then build off of this to use Proposition 1.4 to prove that Pm is not almost universal for every m ≡ 2 (mod 12).

Theorem 1.5. For every m ≡ 2 (mod 12), the form Pm is not almost universal. Remarks. (1) For any given lattice coset L + ν, 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 for lattice cosets, proving a theorem analogous to Earnest, Hsia, and Hung’s results in [6]. (2) It is natural to ask whether one expects the forms Pm to be almost universal in the case that m ≡ 2 (mod 3) is odd. Guy showed in [7] that P5 is not only almost universal, but indeed universal. Computer calculations indicate that P11 is also almost universal. In order to prove that any given Pm 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 Section 2. In Section 3, we give a proof of Theorem 1.1 (for m even) using the algebraic approach. In Section 4, we provide an alternate proof of Theorem 1.1 from the analytic side. We then finally blend the two approaches together in Section 5 in order to prove Proposition 1.4 and Theorem 1.5.

2. Preliminaries In this section, we introduce the necessary objects components used in the 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 [13]. If L is a lattice and A is the Gram matrix for L with respect to some basis, we write L =∼ A. When A is a diagonal matrix with entries a1, ..., an on the diagonal, then A is written as ha1, ..., ani. For a lattice L, we let V denote the underlying quadratic space; that is, V = QL. 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 Lp = L ⊗Z Zp, where now Lp is a Zp-lattice on Vp := V ⊗Q Qp. Given a lattice L and a vector ν ∈ V , we have the lattice coset L + ν. If we define a lattice M = ZL + ν, then L + ν can be regarded as coset inside the lattice quotient M/L. Elements in L + ν are simply vectors of the form ν + x, where x ∈ L. TERNARY SUMS OF POLYGONAL NUMBERS 5

We are considering representations of an integer n by the sum Pm, which upon completing the square, is seen to be equivalent to the condition that (m − 4)2 3 + 2(m − 2)n 2 is represented by the lattice coset L + ν , where ∼ 2 2 2 L = Lm = h(m − 2) , (m − 2) , (m − 2) i (2.1) in a basis {e1, e2, e3}, and (m − 4) ν = ν := (e + e + e ) , (2.2) m 2(m − 2) 1 2 3 so that (m − 4)2 Q(ν) = 3 . 4 To prove Theorem 1.1, we need to show that all but finitely many Q(ν)+2(m−2)n are represented by the lattice coset L + ν. 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 notation set in [20], with V = QL, we define the class of L + ν as cls(L + ν) = the orbit of L + ν under the action of SO(V ), (2.3) the spinor genus of L + ν as 0 spn(L + ν) = the orbit of L + ν under the action of SO(V )OA(V ), (2.4) and the genus of the lattice coset L + ν by

gen(L + ν) = the orbit of L + ν under the action of SOA(V ), (2.5) and where O0 (V ) denotes the adeles of the kernel of the spinor norm map, θ : SO(V ) → ×/ ×2 A Q Q as defined in [13, §55]. For any further unexplained notation, the reader is directed to [13]. The general strategy will be to show first that there are no local obstructions, i.e. that Q(ν) + 2(m − 2)n is represented by the gen(L + ν) and then we will show that in fact this can pass to a spinor genus representation and subsequently a global representation, under these given conditions. To prove this we will rely on some spinor norm map calculations to count the number of spinor genera in the genus using the following equation introduced in [20],

× Y [JQ : Q θ(SO(Lp + ν))] (2.6) p∈Ω where JQ is the set of ideles of Q and Ω is the set of primes in Q. 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 H denote the upper half-plane, i.e., those τ = u + iv ∈ C with u ∈ R a b  and v > 0. The matrices γ = c d ∈ SL2(Z) (the space of two-by-two integral matrices with aτ+b determinant 1) act on H via fractional linear transformations γτ := cτ+d . For j(γ, τ) := cτ + d, a multiplier system for a subgroup Γ ⊆ SL2(Z) and weight r ∈ R is a function ν :Γ 7→ C such that for all γ, M ∈ Γ (cf. [14, (2a.4)]) ν(Mγ)j(Mγ, τ)r = ν(M)j(M, γτ)rν(γ)j(γ, τ)r. 6 ANNA HAENSCH AND BEN KANE

The slash operator |r,ν of weight r and multiplier system ν is then −1 −r f|r,νγ(τ) := ν(γ) j(γ, τ) f(γτ). A (holomorphic) modular form of weight r ∈ R and multiplier system ν for Γ is a function f : H → C satisfying the following criteria: (1) The function f is holomorphic on H. (2) For every γ ∈ Γ, we have f|r,νγ = f. (2.7) (3) The function f is bounded towards every cusp (i.e., those elements of Γ\(Q ∪ {i∞})). This means that at each cusp % of Γ\H, the function f%(τ) := f|r,νγ%(τ) is bounded as v → ∞, where γ% ∈ SL2(Z) sends i∞ to %. Furthermore, if f vanishes at every cusp (i.e., the limit limτ→i∞ f%(τ) = 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 ∈ N0 and a b  Γ = Γ (M) := ∈ SL ( ): M | c, a ≡ d ≡ 1 (mod M) 1 c d 2 Z for some M ∈ N divisible by 4. The multiplier system we are particularly interested in is given in [17, Proposition 2.1], although we do not need the explicit form of the multiplier for this paper. N 1 1 If T ∈ Γ with T := ( 0 1 ), then by (2.7) we have f(τ + N) = f(τ), and hence f has a Fourier expansion (af (n) ∈ C) X 2πinτ f(τ) = af (n)e N . (2.8) n≥0 The restriction n ≥ 0 follows from the fact that f is bounded as τ → i∞. One commonly sets q := e2πiτ 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 [17, (2.0)], Shimura defined theta functions associated to lattice cosets L + ν (for a lattice L of rank n) and polynomials P on lattice points. Namely, he defined X Q(x) ΘL+ν,P (τ) := P (x)q , x∈L+ν where Q is the quadratic map in the associated quadratic space. We omit P when it is trivial. In this case, we may write rL+ν(`) for the number of elements in L + ν of norm ` and we get X ` ΘL+ν(τ) = rL+ν(`)q . (2.9) `≥0

Shimura then showed (see [17, Proposition 2.1]) that ΘL+ν is a modular form of weight n/2 for 2 Γ1(4N ) (for some N which depends on L and ν) and a particular multiplier. Note that we have a b  taken τ 7→ 2Nτ in Shimura’s definition. To show the modularity properties, for γ = c d ∈ 2 Γ1(4N ), we compute aτ + b a(2Nτ) + 2Nb  a 2Nb 2Nγ(τ) = 2N = = (2Nτ). c c d cτ + d 2N (2Nτ) + d 2N 2 Since γ ∈ Γ1(4N ), we have  a 2Nb  a b  c ∈ Γ ∈ Γ(2N) := γ = ∈ SL2(Z): γ ≡ I2 (mod N) ⊃ Γ1(2N), 2N d c d TERNARY SUMS OF POLYGONAL NUMBERS 7 so we may then use [17, Proposition 2.1]. Specifically, the multiplier is the same multiplier as Θ3, where Θ(τ) := P qn2 is the classical Jacobi theta function. n∈Z We only require the associated polynomial in one case. Namely, for n = 1 and P (x) = x, we require the unary theta functions (see [17, (2.0)] with N 7→ N/t, P (m) = m, A = (N/t), and τ 7→ 2Nτ) X tr2 ϑh,t(τ) = ϑh,t,N (τ) := rq , (2.10) r∈Z 2N r≡h (mod t ) where h may be chosen modulo 2N/t and t is a squarefree of 2N. These are weight 3/2 2 modular forms on Γ1(4N ) the same multliplier system as ΘL+ν.

3. Algebraic approach

As seen in Section 2.1, a natural number n is represented by Pm(x, y, z) if and only if Q(ν) + 2(m − 2)n is represented by the lattice coset L + ν. To begin, we will rule out possible cases for m that cannot occur due to local obstructions.

Lemma 3.1. If m ≡ 0 (mod 4) then Pm(x, y, z) is not almost universal. Proof. When m = 2p + 2 for an odd prime p, then the claim follows immediately from [8, Theorem 7]. Otherwise it can be easily verified that if m ≡ 0 (mod 4) then Pm(x, y, z) always fails to represent an entire square class modulo 8, and is therefore not almost universal.  In what follows we will consider the case where m ≡ 2 (mod 4). Note that in this case Q(ν) is odd and therefore Q(ν) + 2(m − 2)n is always odd. Moreover, we note that in this case (m − 2) (m−4) and 2 are relatively prime. In order for Pm(x, y, z) to be almost universal, a necessary condition is that every integer of the form Q(ν) + 2(m − 2)n is represented by gen(L + ν). Since it will be helpful in much of what follows, we define the ternary lattice M := L + Zν in the basis {ν, e1, e2}. We will also define T := {p prime : p | (m − 2)}. Lemma 3.2. If m ≡ 2 (mod 4) and m 6≡ 2 (mod 12) then every integer of the form Q(ν) + 2(m − 2)n is represented by the genus of L + ν.

Proof. Suppose that m ≡ 2 (mod 4) and m 6≡ 2 (mod 12), and hence 3 - (m − 2). In order to show that Q(ν)+2(m−2)n is represented by the genus of L+ν, it suffices to show that Q(ν)+2(m−2)n is represented locally by Lp + ν at every prime p. ∼ For any prime p 6∈ T , we have Lp = h1, 1, 1i, which is universal, and

Lp + ν = Lp. (3.1)

Therefore, it is immediate that every integer Q(ν)+2(m−2)n is represented by Lp +ν when p 6∈ T . × If p ∈ T \{2}, then Q(ν) + 2(m − 2)n is a unit in Zp , since p cannot divide Q(ν). Suppose that ordp(m − 2) = k. It is immediate that Q(ν) is represented by Mp at every p ∈ T , and from the local square theorem it follows that Q(ν) + 2(m − 2)n is represented by Mp for every choice of a. Suppose that Q(ν) + 2(m − 2)n is represented by an arbitrary coset Lp + tν of Lp in Mp, where t ∈ {0, .., pk − 1}. Then Q(ν) ≡ Q(ω + tν) ≡ t2Q(ν) (mod pk) k × for ω ∈ Lp. Consequently, t = ±1, since the multiplicative group (Z/p Z) contains at most one subgroup of order 2. Therefore Q(ν) + 2(m − 2)n is represented by the coset Lp + ν. Finally, when p = 2, we will proceed by showing that in fact every integer can be written as an k+1 m-gonal number. Suppose that ord2(m − 2) = k + 1, then (m − k) = 2  and (m − 4) = 2γ where 8 ANNA HAENSCH AND BEN KANE

× , γ ∈ Z2 . Then an integer n can be written as an m-gonal number precisely when (m − 2)x2 − (m − 4)x n = = 2kx2 − γx. 2 in other words, γ ± pγ2 − 4(2k)(−n) 1 ± p1 + 2k+2η(n) x = = 2k+1 2k+1β 2 k+2 where η = /γ and β = /γ. From Hensel’s Lemma, we know that 1 + 2 η(n) is a square in Z2, moreover, since the p=adic valuation is multiplicative, it must be the square of a unit. Therefore, 1 + 2k+2η(n) = (1 + 2sδ)2 = 1 + 2s+1δ + 22st2 = 1 + 2s+1(δ + 2s−1δ), × k+2 s+1 s−1 where s ≥ 1 and δ ∈ Z2 . When s > 1, since | 2 η(n) |2=| 2 (δ + 2 δ) |2, it follows that k + 2 + r = s + 1 where r = ord2(n). Therefore, 1 − p(1 + 2sδ)2 1 − (1 + 2sδ) 2sδ 2rδ x = = = = , 2k+1β 2k+1β 2k+1β β since s = k + 1 + r. On the other hand, when s = 1, then k + 2 + r = 2 + ord2(1 + δ), and therefore, 1 + p(1 + 2δ)2 1 + (1 + 2δ) 2 + 2δ 1 + δ 2rδ x = = = = = , 2k+1β 2k+1β 2k+1β 2kβ β since k + r = ord2(1 + δ). Therefore, since every 2-adic integer can be expressed as an m-gonal number, it follows that certainly every Q(ν) + 2(m − 2)n is represented by the coset L2 + ν.  Therefore, when m 6≡ 2 (mod 12), there are no local obstructions to representation by L + ν. Let us also consider the case when m ≡ 2 (mod 12). Lemma 3.3. If m ≡ 2 (mod 12) then every integer of the form Q(ν) + 2(m − 2)n for which ord3(Q(ν) + 2(m − 2)n) = 1 is represented by the genus of L + ν. Proof. If m ≡ 2 (mod 12), then m − 2 is divisible by 3. For p∈ / T and for p ∈ T \{3} the proof k m−4 follows as above. Suppose that p = 3. Under the given conditions, m − 2 = 3 u and 2 = w × where k ≥ 1 and u, w ∈ Z3 . Then,  3w2 3kuw 3kuw  1 3k−1uw 3k−1uw ∼ k 2k 2 ∼ k−1 2k−1 M3 = 3 uw 3 u 0  = 3 3 uw 3 0  . 3kuw 0 32ku2 3k−1uw 0 32k−1

When k > 1, then Q(ν) + 2(m − 2)n is represented by M3 by the local square theorem. When k = 1, then in the upper left-hand corner M3 contains the sublattice 3 · h1, 2i which represents × all elements of Z3 containing an odd power of 3. In the lower right-hand corner M3 contains the 2 × sublattice 3 · h1, 1i, which represents all elements of Z3 containing an even power of 3. Therefore, in this case M3 represents all Q(ν) + 2(m − 2)n. Hence we have established that for every prime, Q(ν) + 2(m − 2)n is represented by the genus of M, and again for primes p 6= 3 is follows easily that this representation must come from the coset L + ν. If ord3(Q(ν) + 2(m − 2)n) = 1 then any representation by M3 is guaranteed to come from 2k the coset L3 + ν, since every integer represented by L3 is divisible by at least 3 . 

It is worth noting here that it is also possible that integers for which ord3(Q(ν) + 2(m − 2)n) > 1 may also be represented by the coset L + ν, but it is not guaranteed. Next, we need to establish which integers are represented by the spinor genus of the coset L + ν. Our given choice of L has class number 1, so we are guaranteed that gen(L) = cls(L). In the following set of lemmas we establish a similar result for the genus and class of the coset L + ν. First we will show that the genus and spinor genus of M coincide. TERNARY SUMS OF POLYGONAL NUMBERS 9

× + Lemma 3.4. Suppose that m ≡ 2 (mod 4), then Zp ⊆ θ(O (Mp)) for every prime p. Conse- quently, gen(M) = spn(M). × + ∼ Proof. When p 6∈ T , then it is clear that Zp ∈ θ(O (Mp)) since Mp = h1, 1, 1i is universal. For m−4 primes p ∈ T \{3} we know that p divides (m − 2) and p does not divide 2 , therefore, let k m−4 × (m − 2) = p  and let 2 = γ where k ≥ 1 and , γ ∈ Zp . Then, in the basis {ν, e1, e2}, we have  3γ2 pkγ pkγ  ∼ k 2k 2 Mp = p γ p  0  pkγ 0 p2k2

k k ν −p ν 3e1 −p ν 3e2 and changing the basis to { γ , γ +  , γ +  } we arrive at  2 −1 M =∼ h3i ⊥ 3p2k (3.2) p −1 2 × × + since 3 6∈ Zp . Given the modular binary component, it is clear from here that Zp ⊆ θ(O (Mp)). k m−4 Finally, suppose p = 3, then keeping (m − 2) = 3  and 2 = γ, we have  2 k−1 k−1  1 γ 3 γ 3 γ 3 ∼ k−1 2k−1 2 R3 := M3 = 3 γ 3  0  . 3k−1γ 0 32k−22

Proceeding as above we can show that R3 contains a binary modular component ∼ 2k R3 = h1i ⊥ 3 h2, 6i, (3.3) × + which by [11, Satz 3], confirms that Z3 ⊆ θ(O (R3)). Since the spinor norm map is not affected × + by scaling, this means that Z3 ⊆ θ(O (M3)). × + Therefore, Zp ⊆ θ(O (Mp)) for every prime p, from which it follows that gen(M) = spn(M) [cf. [13, 102:9]].  Recall from equation (2.6), the number of spinor genera in the genus of the coset is given by

× Y [JQ : Q θ(SO(Lp + ν))] p∈Ω where JQ is the set of ideles of Q and Ω is the set of primes in Q. From this equation, we see that much like in the case of lattices, gen(L + ν) and spn(L + ν) coincide precisely when × Zp ⊆ θ(SO(Lp + ν)) for every prime p. Lemma 3.5. If m ≡ 2 (mod 4) and m 6≡ 2 (mod 12), then spn(L + ν) = gen(L + ν). × Proof. For primes p 6∈ T , it is immediate that Zp ⊆ θ(SO(Lp +ν)) since Lp +ν = Lp = h1, 1, 1i. At primes p ∈ T , we know that Mp is given by equation (3.2), and therefore Zp[ν] splits Mp, leaving a binary modular component. Since the norm group of this binary modular component already × contains all units, it is clear that Zp ⊆ θ(SO(Lp + ν)).  We will note here that the case when m ≡ 2 mod 12 becomes more difficult, since now, although × + we still have Z3[ν] splitting M3 as given by equation (3.3), we no longer have Z3 ⊆ θ(O (M3)). In particular, a straightforward computation of the spinor norm using [11, Satz 3] reveals that the spinor norm misses the square class containing 1. In what follows we state and prove an algebraic version of Theorem 1.1. Since we don’t have a straightforward equality of the spinor genus and genus of the coset using strictly algebraic methods in the case when m ≡ 2 mod 3, this algebraic method is only useful when m 6≡ 2 mod 3. For the former case, we turn to an analytic method in the next section. 10 ANNA HAENSCH AND BEN KANE

Theorem 3.6. If m is a positive integer with m ≡ 2 (mod 4) and m 6≡ 2 (mod 12), then Pm is almost universal. Proof. Since m ≡ 2 (mod 4), it follows from Lemma 3.5 that spn(L + ν) = gen(L + ν). From Lemmas 3.2 we know that when m 6≡ 2 (mod 12) then every integer of the form Q(ν) + 2(m − 4)n is represented by gen(L + ν) and therefore by spn(L + ν). Now it follows immediately from [20, Corollary 2.11] that Q(ν)+2(m−2)n is represented by L+ν provided that n is sufficiently large.  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 6≡ 0 (mod 4). Then we have the following. (1) If m 6≡ 2 (mod 3), then every sufficiently large n may be represented in the form

n = pm(x) + pm(y) + pm(z)

for some x, y, z ∈ Z. That is to say, Pm is almost universal. e (2) If m ≡ 2 (mod 12), then every sufficiently large n∈ / Sm,3 may be represented in the form

n = pm(x) + pm(y) + pm(z) for some x, y, z ∈ Z. o (3) If m ≡ 2 (mod 3) is odd, then every sufficiently large n∈ / Sm,3 may be represented in the form

n = pm(x) + pm(y) + pm(z) for some x, y, z ∈ Z. Proof. We split the proof into four pieces. First we assume that m ≡ 2 (mod 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 m − 42  m − 42  m − 42  m − 42 2(m−2)n+3 = (m − 2)x − + (m − 2)y − + (m − 2)z − . 2 2 2 2 m−4 2 We set N := (m − 2) and ` = `n := 2(m − 2)n + 3 2 . Denoting by rm(`) the number of such solutions (with rm(`) := 0 if ` is not in the correct congruence class), we hence consider the generating function X ` Θm(τ) := rm(`)q , (4.1) n≥0 2πiτ where q := e . The function Θm is a theta series for a lattice coset. Since the gram matrix A = N · I3 associated to the lattice is diagonal with even entries, [17, Proposition 2.1] (with T P (m) = 1, τ 7→ 2Nτ, and h = ((m − 4)/2, (m − 4)/2, (m − 4)/2) ) implies that Θm is a weight 3/2 2 modular form on Γ1(4N ) with some multiplier. As usual, we decompose

Θm(τ) = Em(τ) + Um(τ) + fm(τ), (4.2) where Em is in the space spanned by Eisenstein series, Um is in the space spanned by unary theta functions, and fm is a cusp form which is orthogonal to unary theta functions. Of course, each 2 term in the decomposition is modular of weight 3/2 on Γ1(4N ) with the same multiplier. We now follow an argument of Duke and Schulze-Pillot [5], who proved that sufficiently large integers are represented by quadratic forms if and only if they are represented by the spinor genus of the quadratic form (i.e., they investigated the coefficients of theta series with Θm replaced with the theta series for a lattice). By work of Duke [4], the Fourier coefficients of fm grow at most like 3/7+ε ` , while the coefficients of Em are certain class numbers and by Siegel’s (ineffective) bound 1/2−ε [19] for class numbers grow like  ` for any ` supported on the coefficients of Em. We may TERNARY SUMS OF POLYGONAL NUMBERS 11 hence disregard fm completely whenever the nth coefficient is not supported in Um. We claim that Um is identically zero, and hence the claim is equivalent to checking the congruence conditions determining when ` are supported by Em. However, Shimura [18] used the Siegel–Weil formula for inhomogeneous quadratic forms (i.e., quadratic polynomials) to show that Em is the weighted average of representations by members of the genus of the lattice coset. Hence the congruence conditions for Em 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.2. It remains to show that Um(τ) is identically zero. We may decompose Um(τ) into a linear combination of finitely many unary theta functions (defined in (2.10)). The goal now is to determine the possible ϑh,t in the decomposition with non-zero coefficient. We do so by restricting the possible 2 choices of t with congruence conditions on tr implied by the definition of Θm. The ` upon which ` the coefficients of q in ϑh,t are supported must satisfy ` = tr2 ≡ 0 (mod t). However, the coefficients of the unary theta function are supported on the same integers as the original theta series Θm, since the Eisenstein series are also supported on these coefficients and there would hence otherwise be integers ` upon which the coefficient of Θm is negative, contradicting the fact that it is a generating function for non-negative integers rm(`). Therefore, we conclude that m − 42 2(m − 2)n + 3 = ` ≡ 0 (mod t). 2 Since 2(m − 2) is even and 3 ((m − 4)/2)2 is odd, we conclude that t must be odd. Hence t | 2N = 2(m − 2) implies that t | (m − 2). The congruence then becomes m − 42 3 ≡ 0 (mod t), 2 where t is some divisor of (the odd part of) m − 2. Rewritten, this implies that ! m − 42 t m − 2, 3 . 2 Now note that if p | m − 2 and p | m − 4, then p | m − 2 − (m − 4) = 2 =⇒ p = 2. Thus, since (m − 4)/2 is odd, ! m − 42 m − 2, 3 = (m − 2, 3). 2 We now split the two cases (1) and (2). (1) We now assume that m 6≡ 2 (mod 3), so t | (m − 2, 3) = 1. We conclude that t = 1. However, since m − 2 is even and (m − 4)/2 is odd, we also have  m − 42  m − 42  m − 42 ` = (m − 2)x + + (m − 2)y + + (m − 2)z + ≡ 3 (mod 8). 2 2 2 In particular, ` = tr2 ≡ 3 (mod 8) implies that t = 1 is impossible. Since there are no possible choices of t, we conclude that Um = 0. This gives the first claim in the case m ≡ 2 (mod 4). (2) We now assume that m ≡ 2 (mod 3) (i.e., m ≡ 2 (mod 12)), so that t | (m − 2, 3) = 3 12 ANNA HAENSCH AND BEN KANE 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 Um is a linear combination of forms all of which have t = 3. Hence every n suffiently large for which the corresponding ` is not of the form 3r2 must be represented as the sum of 3 m-gonal numbers. We now consider the case m odd. In this case, (m − 2)x2 − (m − 4)x (m − 2)x2 − (m − 4)y (m − 2)x2 − (m − 4)z n=p (x)+p (y)+p (z) = + + m m m 2 2 2 is equivalent to 8n(m − 2) = 4(m − 2)2x2 − 4(m − 2)(m − 4)x + 4(m − 2)2y2 − 4(m − 2)(m − 4)y + 4(m − 2)2z2 − 4(m − 2)(m − 4)z. Adding 3(m − 4)2 to each side, we obtain 8n(m−2)+3(m−4)2 = (2(m − 2)x + (m − 4))2+(2(m − 2)y + (m − 4))2+(2(m − 2)z + (m − 4))2 . (4.3) 2 Letting Rm(`) be the number of solutions to (4.3) with ` = `n := 8n(m − 2) + 3(m − 4) , by [17, Proposition 2.1] we see that 0 X ` Θm(τ) := Rm(`)q 4N n≥0 is a weight 3/2 modular form on Γ1(4N) with some multiplier. Here N = (m − 2), as in the m ≡ 2 (mod 4) case above. Firstly, we must verify that the local conditions are satisfied, i.e., that `n is represented locally, or equivalently by the genus of the lattice coset. For primes p 6= 2, this follows immediately by the argument in Lemma 3.2. However, for p = 2, by Hensel’s lemma it suffices to check that `n is represented modulo 8. We see this claim directly from 2 Q(ν) = 3(m − 4) ≡ `n (mod 8). 0 We conclude that the relevant coefficients of the Eisenstein series Em in the decomposition (4.2) are positive and it remains to again determine the unary theta functions ϑh,t,2N which may occur in the decomposition (4.2). Arguing as before, we have ` ≡ 0 (mod t) and t | 4N. However, since m is odd, m − 4 is also odd, so ` ≡ 3 (mod 8). It follows that t is odd, and hence t | N. We conclude that t | m − 2, 3(m − 4)2 . Since (m − 2, m − 4) = 1, we conclude that t | (m − 2, 3). (1), continued: If m 6≡ 2 (mod 3), then necessarily t = 1. However, ` ≡ 3 (mod 8) implies that ` is not a square, and hence t = 1 is impossible. (3) Since t is a divisor of 1 or 3, we conclude that t = 1 or t = 3. However, t = 1 is again impossible because R` ≡ 3 (mod 8). Therefore we have t = 3 and the only possible exceptions are in the 2 square class 3Z .  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 Pm is not almost universal for all m ≡ 2 (mod 12). In order to prove Proposition 1.4, we explicitly compute the genus and spinor genus of a lattice coset. Let L + 5ν be the lattice coset associated to P14 as in Section 3. For simplicity, we’ve pulled a factor of 5 out of the ν from Section 3 to more easily see the genus and spinor genus structure in 2 2 2 1 this explicit example. That is to say, L := h12 , 12 , 12 i and ν := 12 (e1 + e2 + e3). Lemma 5.1. TERNARY SUMS OF POLYGONAL NUMBERS 13

(1) Defining 1 µ := (e + 5e + 5e ) , 12 1 2 3 the classes in the genus of L + 5ν are then represented by L + ν, L + 5ν, L + µ, and L + 5µ. (2) The forms L + ν and L + µ form one spinor genus and the forms L + 5ν and L + 5µ form the other spinor genus. Proof. (1) Suppose that M + µ0 ∈ gen(L + ν). For any prime p 6= 2, 3 (3.1) implies that 0 0 ∼ Mp + µ = (M + µ )p = (L + ν)p = Lp, 0 and consequently Mp + µ is not a (proper) lattice coset, but rather, a lattice, from which we may 0 0 conclude that µ ∈ Mp. Moreover, (M + µ )p = Mp and Lp + ν = Lp, so 0  σp(Mp) = σp µ + Mp = Lp + ν = Lp (5.1) 0 0 for σp ∈ SO(Vp). Since µ ∈ QM, there exists c ∈ N such that cµ ∈ M. Moreover, from above c = 2a3b (5.2) for non-negative integers a and b. In what follows we will show that a = 2 and b = 1. 0 0 Suppose that M3 + µ is isomorphic to L3 + ν by σ3 ∈ SO(V3). In particular, σ3(µ ) = α + ν for some α ∈ L3. Note that 3ν ∈ L3, so that L3 + 3ν = L3. Moreover, 0 0 0 σ3 M3 + 3µ = σ3 M3 + µ + 2σ3(µ ) = L3 + ν + 2α + 2ν = L3 + 3ν = L3. (5.3) 0 0 from which we conclude that 3µ ∈ M3, and hence b ≤ 1 in (5.2). But then M3 + 3µ = M3, so that (5.3) becomes 0 σ3(M3) = σ3 M3 + 3µ = L3. (5.4) If b = 0, then 0 L3 = σ3(M3) = σ3(M3 + µ ) = L3 + ν, contradicting the fact that ν∈ / L3. Therefore b = 1. 0 Similarly, since 4ν ∈ L2, we have 4µ ∈ M2 (so a ≤ 2 in (5.2)) and 0 σ2(M2) = σ2 M2 + 4µ = L2 + 4ν = L2. (5.5)

Again, if a < 2, then for some β ∈ L2 we have a 0 0 a 0 L2 = σ2(M2) = σ2 M2 + 2 µ = σ2 M2 + µ + (2 − 1) σ2 µ a a a = L2 + ν + (2 − 1) β + (2 − 1) ν = L2 + 2 ν, which contradicts the fact that 2ν∈ / L2, from which we conclude a = 2. Combining (5.5) with 0 (5.4) and (5.1) implies that σ(M) = L, where σ is the map in SOA(V ) sending M + µ to L + ν. Since the genus of L has only one class, this implies that M and L are actually in the same class. Therefore, there exists σ0 ∈ SO(V ) for which σ0(M) = L. Since cµ0 ∈ M, by linearity we have 1 σ0(µ0) ∈ L. c 0 0 1 0 0 0 However, we have proven that c = 12, so σ (µ ) ∈ 12 L. Thus M +µ is in the same class as L+σ (µ ) with 12σ0(µ0) ∈ L. Moreover, minimality of c implies that we c0σ0(µ0) ∈/ L for c0 < 12. We then enumerate the possibilities to see the claim. (2) Recall that the number of spinor genera in the genus of L+ν is given by Equation 2.6, and from × + Lemma 3.5 and the remark following Lemma 3.5, we know that Zp ⊆ θ(O (L + νp)) for all p 6= 3 + × Q and at the prime 3, θ(O (L+νp)) misses 1. Therefore [JQ : Q p∈Ω θ(SO(L+νp))] = 2 and hence 14 ANNA HAENSCH AND BEN KANE there are two spinor genera in the genus. Now it only remains to find representatives for each of the classes in the spinor genus. To do this, we need only find a map Σ = (σ , σ , ..., σ , ...) ∈ SO0 (V ) 2 3 p A for which Σp(Lp + ν) = Lp + µ at every prime p. For primes away from 2 and 3 we have

Lp + µ = Lp = Lp + ν, and so we can let σp be the identity map for p 6= 2, 3. Moreover, when p = 2, then 1 1 ν = µ − e − e 3 2 3 3 so in fact L2 + ν = L2 + µ, and hence σ2 is also the identity map. When p = 2 we consider the 1 symmetries τe2 and τe3 , then τe2 ◦ τe3 (ν) = 12 (e1 − e2 − e3). However, 1 1 1 µ = (e − e − e ) + e + e 12 1 2 3 2 2 2 3 and therefore we let σ3 = τe2 ◦ τe3 . Then clearly Σ is in the kernel of the adelic spinor norm map, since Q(e2) = Q(e3), and this map sends Lp + ν to Lp + µ locally at every prime p. A similar argument can be used to show that L + 5ν and L + 5µ are representatives for the two classes in the spinor genus of L + 5ν.  Proof of Proposition 1.4. The number of automorphs of either L + ν or L + 5ν is 6, while the number of automorphs of either L + µ or L + 5µ is 2. Thus we conclude by Lemma 5.1 that 3 Θ Θ  Θ = L+5ν + L+5µ spn(L+5ν) 2 6 2 and 3 Θ Θ Θ Θ  E = Θ = L+5ν + L+5µ + L+ν + L+µ . (5.6) (L+5ν) gen(L+5ν) 4 6 2 6 2 We claim that 1 Θ (τ) = Θ (τ) − ϑ (τ), (5.7) spn(L+5ν) gen(L+5ν) 8 1,3,6 2 which would imply the claim. Both sides are modular forms of weight 3/2 on Γ1(4 · 12 ) with the usual Θ3-multiplier. Recall now that by the valence formula, a modular form of weight k for Γ ⊆ SL2(Z) with some multiplier is uniquely determined by the first k [SL ( ) : Γ] 12 2 Z Fourier coefficients, where [SL2(Z) : Γ] is the index of Γ in SL2(Z). Since (cf. [12, p. 2]) Y  1  [SL ( ):Γ (N)] = N 2 1 − , 2 Z 1 p2 p|N we have  1  1 SL ( ):Γ (242) = 244 1 − 1 − = 221184. 2 Z 1 4 9 3 Hence we only need to check 24 ·221184 = 27648 Fourier coefficients to verify (5.7). This is easily verified with a computer by computing the relevant theta series.  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. TERNARY SUMS OF POLYGONAL NUMBERS 15

(1) If ` ≡ 1 (mod 12) is an odd prime, then X2 + Y 2 + Z2 = 3`2 has no solutions in X,Y,Z ∈ Z with X ≡ Y ≡ Z ≡ 5 (mod 12). (2) If ` ≡ 7 (mod 12) is an odd prime, then X2 + Y 2 + Z2 = 3`2 has no solutions in X,Y,Z ∈ Z with X ≡ Y ≡ Z ≡ 1 (mod 12). Proof. (1) As in the proof of Proposition 1.4 (and as in Section 3), we let L + 5ν be the lattice coset 2 associated to P14. The claim is equivalent to the statement that L + 5ν does not represent 3` for all ` ≡ 1 (mod 12). Since Conjecture 1.3 is true for the spinor genus of L + 5ν by Proposition 1.4 and the Fourier coefficients of each ΘM+ν0 are non-negative, then the (24n + 75)th coefficient of the theta function Θspn(L+5ν) is zero if and only if the (24n + 75)th coefficient of ΘM+ν0 is zero for all M + ν0 ∈ spn(L + 5ν). In particular, this implies that if there are infinitely many n for which the (24n + 75)th coefficient of Θspn(L+5ν) vanishes, then there are infinitely many n for which the (24n + 75)th coefficient of L + 5ν also vanishes, which is equivalent to the claim. Specifically, we will show that for every prime ` ≡ 1 (mod 12), L + 5ν does not represent 3`2. 2 In order to show that the 3` th coefficient of ΘL+5ν vanishes for prime ` ≡ 1 (mod 12), we explicitly compute the Eisenstein series Θgen(L+5ν) = Egen(L+5ν) and the linear combination of unary theta functions Uspn(L+5ν). By (5.7), we have 1 U = − ϑ . spn(L+5ν) 8 1,3,6

We next use (5.6) to compute the Eisenstein series component Egen(L+ν). To ease notation, we P n define the sieve operator SN,`, acting on Fourier expansions f(τ) = n≥0 af (n)q by X n f|SN,`(τ) := af (n)q . n≥0 n≡` (mod N) Then a straightforward elementary calculation (by splitting the representations x2+y2+z2 = 24n+3 via the congruence classes of x, y, and z) yields   3 ΘL+5ν(τ) ΘL+5µ(τ) ΘL+ν(τ) ΘL+µ(τ) 3 Θ S24,3(τ) = 48 + + + + 8Θ (3τ) S24,3. 6 2 6 2 Hence by (5.6), we have   1 3 1 3 Egen(L+5ν) = Θ S24,3(τ) − Θ (3τ) S24,3 64 8 2 2 In particular, the 3` th coefficient of Egen(L+5ν) is exactly the number of ways to write 3` as the sum of 3 squares. By [9, Theorem 86], since the quadratic form Q(x, y, z) = x2 + y2 + z2 has genus one, this coefficient is given by 24H3`2 , where   h − d X f 2 H(d) :=  d  f∈N u − f 2 − d ≡0,1 (mod 4) f2 denotes the Hurwitz class number, with h(D) denoting the usual class number√ and letting u(D) be half the size of the automorphism group of the order of discriminant D in Q( D). 16 ANNA HAENSCH AND BEN KANE

However, for d = 3`2, the class number formula [3, Corollary 7.28, page 148] and h(−3) = 1 (as well as the fact that u(−3) = 3 and u(−3r2) = 1 for r > 1) implies that (for ` prime)

h(−3) 1 1  −3 1 −3 H3`2 = + h−3`2 = + ` − = ` + 1 − . (5.8) 3 3 3 ` 3 `

Here (−3/`) is the Kronecker–Jacobi–Legendre symbol, which for ` ≡ 1 (mod 3) is 1 in particular. 2 Thus for prime ` ≡ 1 (mod 3), the coefficient of 3` in Egen(L+5ν) is

1 ` ` · 24 · = . (5.9) 64 3 8 At the same time,   X 2 X −4 2 ϑ (τ) = nq3n = nq3n . (5.10) 1,3,6 n n∈Z n≥0 n≡1 (mod 4)

2 −4  Thus the 3n th coefficient of ϑ1,3,6(τ)/8 is n n/8. For n = ` ≡ 1 (mod 4), we specifically have `/8, which cancels with the coefficient from Egen(L+5ν). Hence by Proposition 1.4 (in particular, see 2 (5.7)), the 3` th coefficient of Θspn(L+5ν) is zero. This yields the claim. (2) We argue similarly to part (1), except this time we use the lattice coset L + ν instead of L + 5ν (the statement is a rewording of the claim that L + ν does not represent any integer of the form 3`2 with ` ≡ 7 (mod 12) prime). The classes in the spinor genus of L + ν are given by L + ν and L + µ. Moreover, by (5.6) we have

1 Θ = Θ = Θ + Θ  . gen(L+ν) gen(L+5ν) 2 spn(L+5ν) spn(L+ν) Rearranging and plugging in (5.7), we have

(5.7) 1 Θ = 2Θ − Θ = Θ + ϑ (τ). spn(L+ν) gen(L+5ν) spn(L+5ν) gen(L+5ν) 8 1,3,6 We then use (5.8) and (5.10) to compute the 3`2 coefficient of each side. For ` ≡ 7 (mod 12) prime, 2 we have (−3/`) = 1 so that (5.9) yields that the 3` th coefficient of the Eisenstein series Θgen(L+ν) is precisely `/8. Since (−4/`) = −1 for ` ≡ 7 (mod 12), the coefficient of ϑ1,3,6(τ)/8 is −`/8, giving cancellation. We conclude that the spinor genus of L + ν does not represent 3`2 by Proposition 1.4. 

We are now ready to prove Theorem 1.5.

Proof of Theorem 1.5. For m ≡ 2 (mod 12), we write m = 12r + 2. We claim that, in particular, Pm does not represent n whenever

m − 42 2(m − 2)n + 3 = 3`2, 2 where ` is any prime satisfying ( ` ≡ 1 (mod 12) if r is odd, (5.11) ` ≡ 7 (mod 12) if r is even. TERNARY SUMS OF POLYGONAL NUMBERS 17

Note first that Pm represents n if and only if there exists x, y, z ∈ Z for which m − 42 24rn + 3(6r − 1)2 = 2(m − 2)n + 3 2  m − 42  m − 42  m − 42 = (m − 2)x + + (m − 2)y + + (m − 2)z + 2 2 2 = (12rx + 6r − 1)2 + (12ry + 6r − 1)2 + (12rz + 6r − 1)2 . (5.12) Notice that since (6r − 1)2 ≡ 1 (mod 24), the left hand side of (5.12) is congruent to 3 modulo 24, so we may write it in the shape 24n0 +3 for some n0. Writing X := 12rx+6r−1, Y := 12ry+6r−1, and Z := 12rz +6r−1, if (5.12) holds, then there hence exist X,Y,Z ∈ Z with X ≡ Y ≡ Z ≡ 6r−1 (mod 12) for which X2 +Y 2 +Z2 = 24n0 +3. In particular, if 24n0 +3 = 3`2 with ` a prime satisfying (5.11), then Theorem 5.2 implies that (5.12) is not solvable. Therefore Pm is not almost universal if there are infinitely many ` prime satisfying (5.11) for which 3`2 is in the set ( ) m − 42 S := 2(m − 2)n + 3 : n ∈ = 24rn + 3(6r − 1)2 : n ∈ . 2 N0 N0 However, note that (for both r even and r odd)

 2 8rn + (6r − 1) : n ∈ N0 = {8rn + 12r(3r + 1) + 1 : n ∈ N0}  2 = j ∈ N : j ≡ 1 (mod 8r), j ≥ (6r − 1) . For ` ≡ 1 (mod 12r) or ` ≡ 7 (mod 12r), we have `2 ≡ 1 (mod 8r), so for ` sufficiently large we have 3`2 ∈ S. Therefore, there are infinitely many ` satisfying (5.11) for which 3`2 ∈ S by the existence of infinitely many primes in arithmetic progressions. Each such ` corresponds to some n which is not represented by Pm, yielding the claim. 

References [1] A. Cauchy, D´emonstration du th´eor`emg´en´eral de Fermat sur les nombres polygones, M´em.Sci. Math. Phys. Inst. France 14 (1813–1815), 177–220; Oeuvres compl`etes VI (1905), 320–353. [2] W.K. Chan and B.-K. Oh, Almost universal ternary sums of triangular numbers, Proc. Amer. Math. Soc. 137 (2009), 3553–3562. [3] D. Cox, Primes of the form x2 + ny2, Wiley, New York, 1989. [4] W. Duke, Hyperbolic distribution problems and half-integral weight Maass forms, Invent. Math. 92 (1988), 73–90. [5] W. Duke and R. Schulze-Pillot, Representation of integers by positive ternary quadratic forms and equidistribution of lattice points on ellipsoids, Invent. Math. 99 (1990), no. 1, 49–57. [6] A.G. Earnest, J.S. Hsia and D.C. Hung, Primitive representations by spinor genera of ternary quadratic forms, J. London Math. Soc. (2) 50 (1994), no. 2, 222–230. [7] R. K. Guy, Every number is expressible as a sum of how many polygonal numbers? Amer. Math. Monthly 101 (1994), 169–172. [8] A. Haensch, A characterization of almost universal ternary quadratic polynomials with odd prime power conduc- tor, J. Number Theory 141 (2014) 202–213. [9] B. Jones, The arithmetic theory of quadratic forms, Carcus Monograph series 10, Math. Assoc. Amer., Buffalo, NY, 1950. [10] B. Kane and Z.W. Sun, On almost universal mixed sums of squares and triangular numbers, Trans. Amer. Math. Soc. 362 (2010), 6425–6455. [11] M. Kneser, Klassenzahlen indefiniter quadratischer Formen in drei oder mehr Veranderlichen, Arch. Math. 7, (1956), 323–332. [12] K. Ono, The web of modularity: Arithmetic of the coefficients of modular forms and q-series, Amer. Math. Soc, 2004. [13] O.T. O’Meara, Introduction to quadratic forms, Springer-Verlag, New York, 1963. 18 ANNA HAENSCH AND BEN KANE

[14] H. Petersson, Konstruktion der Modulformen und der zu gewissen Grenzkreisgruppen geh¨origenautomorphen Formen von positiver reeller Dimension und die vollst¨andigeBestimmung ihrer Fourierkoeffzienten, S.-B. Hei- delberger Akad. Wiss. Math. Nat. Kl. (1950), 415–474. [15] R. Schulze-Pillot, Darstellungsmaß;e von Spinorgeschlectern tern¨arer quadratischer Formen, J. Reine Angew. Math. 352 (1984), 114–132. [16] R. Schulze-Pillot, Thetareihen positiv definiter quadratischer Formen, Invent. Math. 75 (1984), 283–299. [17] G. Shimura, On modular forms of half-integral weight, Ann. Math. 97 (1973), 440–481. [18] G. Shimura, Inhomogeneous quadratic forms and triangular numbers, Amer. J. Math. 126 (2004), 191–214. [19] C. Siegel, Uber¨ die analytische Theorie der quadratischen Formen, Ann. Math. 36 (1935), 527–606. [20] F. Xu, Strong approximation for certain quadric fibrations with compact fibers, Adv. Math. 281 (2015), 279–295.

Anna Haensch, Department of Mathematics and Computer Science, Duquesne University, Pitts- burgh, PA 15282, USA. E-mail address: [email protected]

Ben Kane, Deparmtent of Mathematics, University of Hong Kong, Pokfulam, Hong Kong. E-mail address: [email protected]