COSINES AND TRIANGULAR NUMBERS

H.M. FARKAS AND I. KRA

1. Introduction

The triangular numbers, those of the form \frac{m(m+1)}{2} with m a nonnegative integer (m ∈ ℤ^{+} ∪ {0}), have many mysterious properties. Some of these are very classical results and go back 150 years and some are more recent discoveries. We recall just two of the properties to put the problem in perspective, and begin with the appropriate definitions.

Definition 1.1. Let k and N be positive integers. A representation of N as a sum of k triangular numbers is vector (m_{1}, ..., m_{k}) ∈ (ℤ^{+}∪{0})^{k}

with ∑_{i=1}^{k} \frac{m_{i}^{2}+m_{i}}{2} = N. Let T_{k}(N) be the number of such representations.

Example 1.2. If we take N = 5, then we can only use the triangular numbers 3 (m = 2), 1 (m = 1) and 0 (m = 0) in its representations as a sum of (not more than) 4 triangular numbers. Hence its representations are of the form (a, b, c, d) with one of the entries 2, two entries 1 and one 0. It follows that T_{4}(5) = 12.

Proposition 1.3. For all N ∈ ℤ^{+} ∪ {0}, T_{4}(N) = σ(2N + 1), where σ(N) is the sum of the positive divisors of the positive integer N.

Corollary 1.4. The odd integer 2ℓ + 1 is prime if and only if T_{4}(ℓ) = 2(ℓ + 1).

Proposition 1.5. Let N be a positive integer. If N is not a triangular

number, then ∑_{j=0}^{\frac{j^{2}−j}{2} ≤N−1}(−1)^{j}(2j + 1)σ (N − \frac{j(j+1)}{2}) = 0.

There is a corresponding statement for triangular numbers. The above results and some generalizations can be found in [FK, §11]. Note that Proposition 1.5 gives a recursion formula for σ(N) in terms of a thin subset of {σ(n); with n < N}.

Research by IK supported in part by NSF Grant DMS 9500557. Research by HMF supported in part by the Edmund Landau Center for Research in Mathematical Analysis sponsored by the Minerva Foundation Germany. Research of HMF and IK supported in part by US-Israel BSF Grant 95-348.

In this note we present another rather mysterious property of triangular numbers related to products of cosines. In fact we are once again counting representations but are giving each representation a weight (which can be a real number) and summing the weights. Before we give a formal definition we discuss an example which illustrates the idea and motivates the definition.

2. Weighted sums of triangular numbers

Let N be a positive integer. If N is not a triangular number its weight is defined to be 0. If N is a triangular number N = \frac{m^{2}+m}{2}

(m ∈ ℤ^{+} ∪ \{0\}), its weight is defined to be cos(\frac{(2m+1)π}{6})_{cos \frac{π}{6}}.

If N is triangular its weight is either 0, +1 or −1 depending on the residue class of m mod 6. If m ≡ 1, 4 mod 6, the weight is zero; if m ≡ 2, 3 mod 6, the weight is −1; while if m ≡ 0, 5 mod 6, the weight is +1. It is clear that for m ≡ 1, 4 mod 6, \frac{m^{2}+m}{2} ≢ 0 mod 3 while in the other cases \frac{m^{2}+m}{2} ≡ 0 mod 3. In fact, weight −1 corresponds to those triangular number which are of the form 3 (\frac{3m^{2}+m}{2}) with m odd and weight 1 corresponds to those of the same form with m even. In other words, the only triangular numbers with non-zero weight correspond to multiples of (generalized) pentagonal numbers by 3. These facts have the following interpretation:

∑_{m=0}^{∞} \begin{matrix}cos & \frac{(2m+1)π}{6} \\ cos & \frac{π}{6} \end{matrix} x^{m} = ∑_{n=−∞}^{∞}(−1)^{n}x^{\frac{3(3n^{2}+n)}{2}} = ∏_{n=1}^{∞}(1 − x^{3n}).

This example is the case k = 3 of the general situation described next.

Let k be a positive odd integer ≥ 3. Let N be a positive integer and (m_{1}, ..., m_{\frac{k−1}{2}} ) a representation of N as a sum of \frac{k−1}{2} triangular

numbers, N = ∑_{i=1}^{\frac{k−1}{2}} \frac{m_{i}^{2}+m_{i}}{2} .

Define the weight of the representation of N corresponding to the vector (m_{1}, ..., m_{\frac{k−1}{2}} ) to be

∏_{i=1}^{\frac{k−1}{2}} \begin{matrix}cos & (\frac{(2m_{i}+1)(2i−1)π}{2k} ) \\ cos & (\frac{(2i−1)π}{2k} ) \end{matrix}.

Note that the weight of a representation is not necessarily an integer. If we take k = 5 and N = 1, the representations are (1, 0) and (0, 1). The weights are \begin{matrix}cos & \frac{3π}{10} \\ cos & \frac{π}{10} \end{matrix} and \frac{− cos \frac{π}{10}}{cos \frac{3π}{10}} . These are respectively \frac{\sqrt{5}−1}{2} and

− (\frac{\sqrt{5}+1}{2}); their sum is −1, an integer.

We prove the following

Theorem 2.1. Let k ≥ 3 be an integer and let N an arbitrary positive integer. Let

S_{N} = \{(m_{1}, …, m_{\frac{k−1}{2}} ) ∈ (ℤ^{+} ∪ \{0\})^{\frac{k−1}{2}} ; ∑_{i=0}^{\frac{k−1}{2}} \frac{m_{i}^{2} + m_{i}}{2} = N\} .

Then

∑_{(m_{1},... ,m_{\frac{k−1}{2}} )∈S_{N}} ∏_{i=1}^{\frac{k−1}{2}} \begin{matrix}cos & (\frac{(2m_{i}+1)(2i−1)π}{2k} ) \\ cos & (\frac{(2i−1)π}{2k} ) \end{matrix} = A_{N},  (2.1)

with A_{N} an integer defined by the following series

∏_{n=1}^{∞}(1 − x^{n})^{\frac{k−3}{2}} (1 − x^{kn}) = 1 + ∑_{N=1}^{∞} A_{N}x^{N}.  (2.2)

The integers A_{N} have the following combinatorial interpretation: Let Y be the set of \frac{k−3}{2} copies of the non-negative integers not multiples of k and \frac{k−1}{2} copies of the multiples of k. For I a positive integer, partition I from the set Y, thus allowing at most \frac{k−3}{2} repetitions of integers not multiples of k and \frac{k−1}{2} repetitions of multiples of k. Call a partition even if the partition contains an even number of parts and odd otherwise. Then A_{N} is the difference between the number of even and odd partitions of N from the set Y.

3. Theta Constants

The above theorem is a formal consequence of the Jacobi triple product formula. It arose in our work related to Ramanujan partitions [FK2], where we investigated conditions under which an averaging process produces constant functions. We begin by recalling

Definition 3.1. For τ in ℍ^{2} = \{z ∈ ℂ; ℑz > 0\} and [ \begin{matrix}ε \\ ε′ \end{matrix} ] ∈ ℝ^{2}, the

theta constant with characteristic [ \begin{matrix}ε \\ ε′ \end{matrix} ] is

θ [ \begin{matrix}ε \\ ε′ \end{matrix} ] (0, τ) = ∑_{n=−∞}^{∞} exp 2πı [\frac{1}{2} (n + \frac{ε}{2})^{2} τ + (n + \frac{ε}{2}) \frac{ε′}{2} ] .

The properties of these functions are well known, and can be found, for example, in [FK1] and the references given there. The θ-function is a function of two variables z ∈ ℂ and τ ∈ ℍ^{2}. The θ-constant is the value of this function at z = 0. It follows from the definition of the theta function (as a function of the two variables) (with ′ = \frac{∂}{∂z}) that,

θ′ [ \begin{matrix}ε \\ ε′ \end{matrix} ] (0, τ) = 2πı ∑_{n=−∞}^{∞} (n + \frac{ε}{2}) exp 2πı [\frac{1}{2} (n + \frac{ε}{2})^{2} τ + (n + \frac{ε}{2}) \frac{ε′}{2} ] .

Fix an odd integer k > 1. Our interest here is restricted to the functions listed below with m a positive odd integer < k. Let x = e^{2πiτ}. Then

θ [ 1_{\frac{m}{k}} ] (0, τ) = ∑_{n=−∞}^{∞} exp 2πı [\frac{1}{2} (n + \frac{1}{2})^{2} τ + (n + \frac{1}{2}) \frac{m}{2k} ] =

∑_{n=−∞}^{∞} exp 2πı (n + \frac{1}{2}) \frac{m}{2k}x^{^{\frac{1}{2}}(n+ \frac{1}{2})^{2}} =

x^{\frac{1}{8}} ∑_{n=−∞}^{∞} exp 2πı [(n + \frac{1}{2}) \frac{m}{2k} ] x^{\frac{n^{2}+n}{2}} =

x^{\frac{1}{8}} ∑_{n=0}^{∞} (exp 2πı (n + \frac{1}{2}) \frac{m}{2k} + exp 2πı (−(n + 1) + \frac{1}{2}) \frac{m}{2k} ) x^{\frac{n^{2}+n}{2}} =

x^{\frac{1}{8}} ∑_{n=0}^{∞} [exp (πı(2n + 1)\frac{m}{2k} ) + exp (−πı((2n + 1)\frac{m}{2k} )] x^{\frac{n^{2}+n}{2}} =

x^{\frac{1}{8}} ∑_{n=0}^{∞} 2 cos (\frac{(2n+1)mπ}{2k} ) x^{\frac{n^{2}+n}{2}} .

It thus follows using (2.1) that

∏_{l=0}^{\frac{k−3}{2}} θ [ 1_{\frac{1+2l}{k}} ] (0, τ) = x^{\frac{k−1}{16}} ∏_{l=0}^{\frac{k−3}{2}} ∑_{n=0}^{∞} 2 cos (\frac{(2n+1)(1+2l)π}{2k} ) x^{\frac{n^{2}+n}{2}} =

2^{\frac{k−1}{2}} ( ∏_{l=0}^{\frac{k−3}{2}} cos \frac{(1+2l)π}{2k} ) (1 + ∑_{N=1}^{∞} A_{N}x^{N} ) .

What remains is to prove that A_{N} is an integer given by (2.2).

The Jacobi triple product formula [HW] says that for x and z ∈ ℂ with 0 < |x| < 1 and z ≠ 0,

∑_{n=−∞}^{∞} x^{n^{2}}z^{n} = ∏_{n=1}^{∞}(1 − x^{2n})(1 + x^{2n−1}z) (1 + \frac{x^{2n−1}}{z} ) .

Hence

∏_{l=0}^{\frac{k−3}{2}} θ [ 1_{\frac{1+2l}{k}} ] (0, τ) = 2^{\frac{k−2}{2}} x^{\frac{k−1}{16}} ∏_{l=0}^{\frac{k−3}{2}} cos \frac{(1 + 2l)π}{2k} ∏_{n=1}^{∞}(1−x^{n})^{\frac{k−3}{2}} (1−x^{kn});

which completes the proof of the theorem.

4. Remarks on cosine identities

That there are identities involving the numbers cos (\frac{(2i−1)π}{2k} ), i = 1, …, \frac{k−1}{2}, and that the A_{N} are integers are not surprising since the numbers involved are algebraic. In fact, one can see quite easily that

2^{k−1} ∏_{i=1}^{\frac{k−1}{2}} cos^{2} (\frac{(2i−1)π}{2k} ) = k. We proceed to prove this simple fact.

We begin with the elementary identity

\frac{z^{k} − 1}{z − 1} = 1 + z + z^{2} + ⋯ + z^{k−1} = ∏_{ℓ=1}^{k−1}(z − e^{\frac{2πiℓ}{k}}) = ∏_{ℓ=1}^{k−1}(z + e^{\frac{πi}{k} (2ℓ+k)}).

Evaluating at z = 1 tells us that

k = | ∏_{ℓ=1}^{k−1}(1 + e^{\frac{πi}{k} (2ℓ+k)})| = | ∏_{ℓ=1}^{k−1}(e^{− \frac{πi}{2k} (2ℓ+k)} + e^{\frac{πı}{2k} (2ℓ+k)}) =

= | ∏_{ℓ=1}^{k−1} 2 cos ((\frac{2ℓ+k}{2k} ) π) | = 2^{k−1} ∏_{ℓ=1}^{\frac{k−1}{2}} cos^{2} (\frac{(2ℓ−1)π}{2k} ) .

The above identity is just one of many which follow from the fact that

2^{k−1} ∏_{ℓ=1}^{\frac{k−1}{2}} (x^{2} − cos^{2} (\frac{(2ℓ − 1)π}{2k} ))

is a polynomial with integer coefficients. Hence that there are identities involving these cosines is no surprise. That the identities are related to the triangular numbers is the surprise here.

We close with some final remarks concerning the identities derived. If we set x = cos \frac{π}{2k} in any of the identities (2.1) and use the recursion relation

cos \frac{mπ}{2k} = cos \frac{(m − 2)π}{2k} (2 cos^{2} \frac{π}{2k} − 1) − cos \frac{(m − 4)π}{2k} ,

then each identity becomes a polynomial in x with integer coefficients that vanishes at x = \frac{π}{2k}. It therefore follows that each identity is a multiple of the minimal polynomial (with integer coefficients) satisfied by cos \frac{π}{2k}. This minimal polynomial has been computed above.

Finally we remark that our motivation for this study was the construction of automorphic functions and forms for the group Γ_{o}(k) =

\{[ \begin{matrix}a & b \\ c & d \end{matrix} ] ∈ PSL(2, ℤ); k|c\}. The product we evaluated in this note

was a natural candidate for a modular form since the characteristics

[ 1_{\frac{m}{k}} ] with m odd are permuted by Γ_{o}(k). Using function theory, we prove that for each odd prime k,

θ′^{− \frac{(k−1)(k−5)}{12}} [ \begin{matrix}1 \\ 1 \end{matrix} ] (0, τ) ∏_{l=0}^{\frac{k−3}{2}} \frac{θ^{\frac{k−3}{2}} [ 1_{\frac{1+2l}{k}} ] (0, τ)}{θ [ 1^{\frac{1+2l}{k}} ] (0, kτ)}

is a constant function. Since this identity is also a formal consequence of the Jacobi triple product formula, it is valid for all odd k ≥ 3. We shall return to this subject in another place.

The case k=5 is worthy of special mention since in this case we get an additional identity which we leave to the reader to ennunciate.

REFERENCES

[FK ] Farkas, H.M. and Kra, I., A function theoretic approach to the Ramanujan partition identities with applications to combinatorial number theory, Proc. of Iberoamerican Congress on Geometry (Santiago, Chile 1998), pp. 75–106.

[FK1 ] ———-, Automorphic forms for subgroups of the modular group,

Israel J. Math. (82) 1993, pp. 87–131. [FK2 ] ———-, Ramanujan partition identities, Proc. of Iberoamerican

Congress on Geometry (Santiago, Chile 1998), pp. 107–128. [HW ] Hardy, G.H. and Wright, E.M., An Introduction to the Theory

of Numbers, Oxford Univ. Press (1960).

The Hebrew University of Jerusalem Jerusalem 91904, Israel and

COSINES AND TRIANGULAR NUMBERS 7

State University of New York at Stony Brook Stony Brook, NY 11794, USA