Jacobsthal and Jacobsthal-Lucas Numbers and Sums Introduced by Jacobsthal and

Tverberg

Kritkhajohn Onphaeng and Prapanpong Pongsriiam^{1} Department of Mathematics Faculty of Science Silpakorn University Nakhon Pathom 73000 Thailand

                      dome3579@gmail.com
                     prapanpong@gmail.com

Abstract We study the sums introduced by Jacobsthal and Tverberg and show that the extreme values of the sums are connected with Jacobsthal and Jacobsthal-Lucas numbers.

1 Introduction

Let a, b ∈ ℤ and m ∈ ℤ^{+}. In 1957, Jacobsthal [4] introduced the sums of the form

S_{a,b;m}(K) = ∑_{k=0}^{K} f_{a,b;m}(k),

where

f_{a,b;m}(k) = ⌊\frac{a + b + k}{m} ⌋ − ⌊\frac{a + k}{m} ⌋ − ⌊\frac{b + k}{m} ⌋ + ⌊\frac{k}{m}⌋ .  (1)

1Prapanpong Pongsriiam receives financial support jointly from Faculty of Science Silpakorn University, and The Thailand Research Fund, grant number RSA5980040. Correspondence should be addressed to Prapanpong Pongsriiam: prapanpong@gmail.com .

In the above equation and throughout this article, unless stated otherwise, k is an integer and K is a nonnegative integer. So we can consider f_{a,b;m} and S_{a,b;m} as functions of k and K defined on ℤ and on ℕ ∪ {0}, respectively.

These sums are also studied by Carlitz [1, 2], Grimson [3] and recently by Tverberg [6]. In addition, Tverberg [6] extends the definition of f_{a,b;m}(k) and S_{a,b;m}(K) to the following form.

Definition 1. Let m and ℓ be positive integers and let C be a multiset of ℓ integers a_{1}, a_{2}, …, a_{ℓ}, i.e., a_{i} = a_{j} is allowed for some i ≠ j. Define f_{C;m} : ℤ → ℤ and S_{C;m} : ℕ ∪ {0} → ℤ by

f_{C;m}(k) = ∑_{T ⊆[1,ℓ]}(−1)^{ℓ−|T |} ⌊\frac{k + ∑_{i∈T} a_{i}}{m} ⌋ ,

S_{C;m}(K) = ∑_{k=0}^{K} f_{C;m}(k).

We sometimes write f_{a_{1},a_{2},...,a_{ℓ};m}(k) and S_{a_{1},a_{2},...,a_{ℓ};m}(K) instead of f_{C;m}(k) and S_{C;m}(K), respectively. The set [1, ℓ] appearing in the sum defining f is {1, 2, 3, …, ℓ} and if T = ∅, then ∑_{i∈T} a_{i} is defined to be zero.

For example, if C = {a, b}, then f_{C;m}(k) given in Definition 1 is the same as f_{a,b;m}(k) given in (1), and if C = {a_{1}, a_{2}, a_{3}}, then f_{C;m}(k) is

f_{a_{1},a_{2},a_{3};m}(k) = ⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{2} + a_{3} + k}{m} ⌋

+ ⌊\frac{a_{1} + k}{m} ⌋ + ⌊\frac{a_{2} + k}{m} ⌋ + ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ .

Jacobsthal [4] shows that for any K ∈ ℕ ∪ {0}, we have

0 ≤ S_{a,b;m}(K) ≤ ⌊\frac{m}{2}⌋ ,  (2)

which is a sharp inequality, that is, the lower bound 0 is actually the minimum value and the upper bound ⌊\frac{m}{2}⌋ is the maximum value of S_{a,b;m}(K). Tverberg [6] proves (2) in a different way and he also gives the extreme values of S_{a_{1},a_{2},a_{3};m}(K) without proof. Nevertheless, the extreme values of f_{a_{1},a_{2},...,a_{ℓ};m}(k) (for ℓ ≥ 2) and S_{a_{1},a_{2},...,a_{ℓ};m}(K) (for ℓ ≥ 4) have not been calculated.

In this article, we calculate the extreme values of f_{a_{1},a_{2},...,a_{ℓ};m}(k) for all ℓ ≥ 2 (see Theorem 8). We also introduce the function g in Definition 2, give its connection with f_{a_{1},a_{2},...,a_{ℓ};m}(k), and obtain its extreme values (see Proposition 3 and Theorem 4). Furthermore, we obtain the minimum value of S_{a_{1},a_{2},...,a_{ℓ};m}(K) when ℓ is odd and the maximum value of S_{a_{1},a_{2},...,a_{ℓ};m}(K) when ℓ is even (see Theorem 9).

The reader will see that the extreme values of the functions g and f_{a_{1},a_{2},...,a_{ℓ};m}(k) are connected with Jacobsthal numbers J_{n} and Jacobsthal-Lucas numbers j_{n} defined, respectively, by the recurrence relations

J_{0} = 0, J_{1} = 1, J_{n} = J_{n−1} + 2J_{n−2} for n ≥ 2,

and

j_{0} = 2, j_{1} = 1, j_{n} = j_{n−1} + 2j_{n−2} for n ≥ 2.

The sequences (J_{n})_{n≥0} and (j_{n})_{n≥0} are, respectively, \underline{A001045} and \underline{A014551} in the OEIS [5]. The function g is defined as follows: Definition 2. Let g : ℝ^{n} → ℤ be given by

g(x_{1}, x_{2}, x_{3}, …, x_{n}) = ∑_{1≤i≤n}⌊x_{i}⌋ − ∑_{1≤i_{1}<i_{2}≤n}⌊x_{i_{1}} + x_{i_{2}}⌋

+ ∑_{1≤i_{1}<i_{2}<i_{3}≤n}⌊x_{i_{1}} + x_{i_{2}} + x_{i_{3}}⌋ − ⋯ + (−1)^{n−1}⌊x_{1} + x_{2} + x_{3} + ⋯ + x_{n}⌋.

In other words,

g(x_{1}, x_{2}, x_{3}, …, x_{n}) = ∑_{∅≠T ⊆[1,n]}(−1)^{|T |−1} ⌊∑_{i∈T} x_{i}⌋ .

2 Main results

We begin this section by giving a relation between the functions f and g. Then we give the extreme values of g and f and their connection with Jacobsthal and Jacobsthal-Lucas numbers. Proposition 3. For each ℓ ≥ 2, we have

(i) f_{a_{1},a_{2},...,a_{ℓ};m}(0) = (−1)^{ℓ−1}g (\frac{a_{1}}{m} , \frac{a_{2}}{m} , ⋯, \frac{a_{ℓ}}{m}),

(ii) f_{a_{1},a_{2},...,a_{ℓ};m}(k) = (−1)^{ℓ}g (\frac{a_{1}}{m} , \frac{a_{2}}{m} , ⋯, \frac{a_{ℓ}}{m}, \frac{k}{m}) + (−1)^{ℓ−1}g (\frac{a_{1}}{m} , \frac{a_{2}}{m} , ⋯, \frac{a_{ℓ}}{m}). Proof. This follows easily from the definitions of f and g but we give a proof for completeness. We have

f_{a_{1},a_{2},...,a_{ℓ};m}(0) = ∑_{T ⊆[1,ℓ]}(−1)^{ℓ−|T |} ⌊∑_{i∈T} (\frac{a_{i}}{m})⌋

= ∑_{∅≠T ⊆[1,ℓ]}(−1)^{ℓ−|T |} ⌊∑_{i∈T} (\frac{a_{i}}{m})⌋

= (−1)^{ℓ−1} ∑_{∅≠T ⊆[1,ℓ]}(−1)^{1−|T |} ⌊∑_{i∈T} (\frac{a_{i}}{m})⌋

= (−1)^{ℓ−1}g (\frac{a_{1}}{m}, \frac{a_{2}}{m}, …, \frac{a_{ℓ}}{m}) .

Next let a_{ℓ+1} = k. Then we obtain

(−1)^{ℓ}g (\frac{a_{1}}{m}, \frac{a_{2}}{m}, ⋯, \frac{a_{ℓ}}{m}, \frac{k}{m}) + (−1)^{ℓ−1}g (\frac{a_{1}}{m}, \frac{a_{2}}{m}, ⋯, \frac{a_{ℓ}}{m})

=(−1)^{ℓ} ( ∑_{∅≠T ⊆[1,ℓ+1]}(−1)^{|T |−1} ⌊∑_{i∈T} (\frac{a_{i}}{m})⌋ − ∑_{∅≠T ⊆[1,ℓ]}(−1)^{|T |−1} ⌊∑_{i∈T} (\frac{a_{i}}{m})⌋)

=(−1)^{ℓ} ∑_{\begin{matrix}T ⊆[1,ℓ+1] \\ ℓ+1∈T \end{matrix}}(−1)^{|T |−1} ⌊∑_{i∈T} (\frac{a_{i}}{m})⌋

=(−1)^{ℓ} ∑_{T ⊆[1,ℓ]}(−1)^{|T |} ⌊\frac{k + ∑_{i∈T} a_{i}}{m} ⌋
=f_{a_{1},a_{2},...,a_{ℓ};m}(k).

Theorem 4. For each n ≥ 2, the function g given in Definition 2 has maximum value 2^{n−2} − 1 and minimum value −2^{n−2}. The minimum occurs at least when x_{k} = \frac{1}{2} for every 1 ≤ k ≤ n. The maximum occurs at least when x_{k} = \frac{1}{2} − \frac{1}{n^{2}} for every 1 ≤ k ≤ n.

Proof. If n = 2, then the result is a well-known inequality

−1 ≤ ⌊x⌋ + ⌊y⌋ − ⌊x + y⌋ ≤ 0,  (3)

which holds for all x, y ∈ ℝ. The inequality (3) is sharp: if x = y = \frac{1}{2} the left inequality in (3) becomes equality, and if x = y = \frac{1}{4} the right inequality in (3) becomes equality. The result when n ≥ 3 is obtained from the case n = 2 and a careful selection of pairs. For illustration purpose, we first give a proof for the case n = 3 and n = 4. Recall that

g(x_{1}, x_{2}, x_{3}) = ⌊x_{1}⌋ + ⌊x_{2}⌋ + ⌊x_{3}⌋ − ⌊x_{1} + x_{2}⌋ − ⌊x_{1} + x_{3}⌋ − ⌊x_{2} + x_{3}⌋ + ⌊x_{1} + x_{2} + x_{3}⌋.

We obtain by (3) that

0 ≤ ⌊x_{1} + x_{2} + x_{3}⌋ − ⌊x_{1} + x_{2}⌋ − ⌊x_{3}⌋ ≤ 1,  (4)
−1 ≤ −⌊x_{2} + x_{3}⌋ + ⌊x_{2}⌋ + ⌊x_{3}⌋ ≤ 0,  (5)
−1 ≤ −⌊x_{1} + x_{3}⌋ + ⌊x_{1}⌋ + ⌊x_{3}⌋ ≤ 0.  (6)

Summing (4), (5), and (6), the middle terms give g(x_{1}, x_{2}, x_{3}). Then −2 ≤ g(x_{1}, x_{2}, x_{3}) ≤ 1. Next we consider

g(x_{1}, x_{2}, x_{3}, x_{4}) = ⌊x_{1}⌋ + ⌊x_{2}⌋ + ⌊x_{3}⌋ + ⌊x_{4}⌋ − ⌊x_{1} + x_{2}⌋ − ⌊x_{1} + x_{3}⌋ − ⌊x_{1} + x_{4}⌋

− ⌊x_{2} + x_{3}⌋ − ⌊x_{2} + x_{4}⌋ − ⌊x_{3} + x_{4}⌋ + ⌊x_{1} + x_{2} + x_{3}⌋ + ⌊x_{1} + x_{2} + x_{4}⌋

+ ⌊x_{1} + x_{3} + x_{4}⌋ + ⌊x_{2} + x_{3} + x_{4}⌋ − ⌊x_{1} + x_{2} + x_{3} + x_{4}⌋.

Again, we obtain by (3) the following inequalities:

−1 ≤ −⌊x_{1} + x_{2} + x_{3} + x_{4}⌋ + ⌊x_{1} + x_{2} + x_{3}⌋ + ⌊x_{4}⌋ ≤ 0,  (7)

0 ≤ ⌊x_{1} + x_{2} + x_{4}⌋ − ⌊x_{1} + x_{2}⌋ − ⌊x_{4}⌋ ≤ 1,  (8)
0 ≤ ⌊x_{1} + x_{3} + x_{4}⌋ − ⌊x_{1} + x_{3}⌋ − ⌊x_{4}⌋ ≤ 1,  (9)
0 ≤ ⌊x_{2} + x_{3} + x_{4}⌋ − ⌊x_{2} + x_{3}⌋ − ⌊x_{4}⌋ ≤ 1,  (10)
−1 ≤ −⌊x_{1} + x_{4}⌋ + ⌊x_{1}⌋ + ⌊x_{4}⌋ ≤ 0,  (11)
−1 ≤ −⌊x_{2} + x_{4}⌋ + ⌊x_{2}⌋ + ⌊x_{4}⌋ ≤ 0,  (12)
−1 ≤ −⌊x_{3} + x_{4}⌋ + ⌊x_{3}⌋ + ⌊x_{4}⌋ ≤ 0.  (13)

Summing (7) to (13), we see that −4 ≤ g(x_{1}, x_{2}, x_{3}, x_{4}) ≤ 3.

Next we prove the general case n ≥ 5. The expression of the form ⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{k}}⌋ will be called a k-bracket. So for each 1 ≤ k ≤ n, there are \binom{n}{k} k-brackets appearing in the sum defining g(x_{1}, x_{2}, …, x_{n}). We first pair up the n-bracket with an (n − 1)-bracket and a 1-bracket as follows:

s_{1} = (−1)^{n−1}⌊x_{1} + x_{2} + ⋯ + x_{n}⌋ + (−1)^{n−2}⌊x_{1} + x_{2} + ⋯ + x_{n−1}⌋ + (−1)^{n−2}⌊x_{n}⌋. (14)

Notice that the sign of ⌊x_{n}⌋ in (14) may or may not be the same as that appearing in the sum defining g(x_{1}, x_{2}, …, x_{n}) but it is the same as the sign of ⌊x_{1} + x_{2} + ⋯ + x_{n−1}⌋ so that we can apply (3) to obtain the bound for s_{1}. Next we pair up the remaining (n − 1)-brackets with (n − 2)-brackets and 1-brackets as follows:

(−1)^{n−2}⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−1}}⌋ + (−1)^{n−3}⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−2}}⌋ + (−1)^{n−3}⌊x_{i_{n−1}}⌋, (15)

where 1 ≤ i_{1} < i_{2} < … < i_{n−1} ≤ n. We note again that the sign of ⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−1}}⌋ and ⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−2}}⌋ in (15) are the same as those appearing in the sum defining g(x_{1}, x_{2}, …, x_{n}) while the sign of ⌊x_{i_{n−1}}⌋ in (15) may or may not be the same, but we can apply (3) to obtain the bound of (15). Since ⌊x_{1} + x_{2} + ⋯ + x_{n−1}⌋ appears in (14), the term x_{i_{n−1}} appearing in the (n − 1)-brackets in (15) is always x_{n}. So in fact (15) is

(−1)^{n−2}⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−2}} + x_{n}⌋ + (−1)^{n−3}⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−2}}⌋ + (−1)^{n−3}⌊x_{n}⌋. (16)

Then we sum (16) over all possibles 1 ≤ i_{1} < i_{2} < … < i_{n−2} < n, and call it s_{2}. That is

s_{2} = (−1)^{n−2} ∑_{1≤i_{1}<i_{2}<...<i_{n−2}<n}⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−2}} + x_{n}⌋

+ (−1)^{n−3} ∑_{1≤i_{1}<i_{2}<...<i_{n−2}<n}⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−2}}⌋ + (−1)^{n−3}\binom{n − 1}{n − 2}⌊x_{n}⌋.

We continue doing this process as follows. For each 0 ≤ ℓ ≤ n − 1, let c_{ℓ} be the sum of all ⌊x_{i_{1}} + x_{i_{2}} + ⋯ + x_{i_{n−ℓ}}⌋ with 1 ≤ i_{1} < i_{2} < … < i_{n−ℓ} ≤ n, a_{ℓ} the sum of all such terms with i_{n−ℓ} = n, and b_{ℓ} the sum of all such terms with i_{n−ℓ} < n. Therefore c_{ℓ} = a_{ℓ} + b_{ℓ}. As usual, the empty sum is defined to be zero, so b_{0} = 0. The number of (n − ℓ)-brackets appearing in the sum defining c_{ℓ} is \binom{n}{n−ℓ}, the number of (n − ℓ)-brackets appearing in the sum defining a_{ℓ} is \binom{n−1}{n−ℓ−1}, and the number of (n − ℓ)-brackets appearing in the sum defining b_{ℓ} is \binom{n−1}{n−ℓ}. In addition, we have

s_{1} = (−1)^{n−1}a_{0} + (−1)^{n−2}b_{1} + (−1)^{n−2}⌊x_{n}⌋,
s_{2} = (−1)^{n−2}a_{1} + (−1)^{n−3}b_{2} + (−1)^{n−3}\binom{n − 1}{n − 2}⌊x_{n}⌋.

In general, for each 1 ≤ ℓ ≤ n − 1, we let

s_{ℓ} = (−1)^{n−ℓ}a_{ℓ−1} + (−1)^{n−ℓ−1}b_{ℓ} + (−1)^{n−ℓ−1}\binom{n − 1}{n − ℓ}⌊x_{n}⌋.

Then

∑_{1≤ℓ≤n−1} s_{ℓ} = (−1)^{n−1}a_{0} + ∑_{2≤ℓ≤n−1}(−1)^{n−ℓ}a_{ℓ−1} + ∑_{1≤ℓ≤n−2}(−1)^{n−ℓ−1}b_{ℓ} + b_{n−1}

+ ⌊x_{n}⌋ ∑_{1≤ℓ≤n−1}(−1)^{n−ℓ−1}\binom{n − 1}{n − ℓ}.  (17)

Recall a well known identity ∑_{0≤ℓ≤n}(−1)^{ℓ}\binom{n}{ℓ} = 0 for all n ≥ 1. Therefore the last sum on the right hand side of (17) is

− ∑_{1≤ℓ≤n−1}(−1)^{n−ℓ}\binom{n − 1}{n − ℓ} = − ∑_{1≤ℓ≤n−1}(−1)^{ℓ}\binom{n − 1}{ℓ} = − ∑_{0≤ℓ≤n−1}(−1)^{ℓ}\binom{n − 1}{ℓ} + 1 = 1.

Therefore the last term in (17) is ⌊x_{n}⌋. Replacing ℓ by ℓ + 1 in the first sum on the right hand side of (17), we see that

∑_{1≤ℓ≤n−1} s_{ℓ} = (−1)^{n−1}a_{0} + ∑_{1≤ℓ≤n−2}(−1)^{n−ℓ−1}(a_{ℓ} + b_{ℓ}) + b_{n−1} + ⌊x_{n}⌋

= (−1)^{n−1}c_{0} + ∑_{1≤ℓ≤n−2}(−1)^{n−ℓ−1}c_{ℓ} + b_{n−1} + ⌊x_{n}⌋

= (−1)^{n−1}c_{0} + ∑_{1≤ℓ≤n−2}(−1)^{n−ℓ−1}c_{ℓ} + c_{n−1}  (18)

= ∑_{0≤ℓ≤n−1}(−1)^{n−ℓ−1}c_{ℓ}

= g(x_{1}, x_{2}, …, x_{n}),

where (18) can be obtained from the definition of c_{n−1}, b_{n−1}, and a_{n−1} that

c_{n−1} = ⌊x_{1}⌋ + ⌊x_{2}⌋ + ⋯ + ⌊x_{n}⌋ ,
b_{n−1} = ⌊x_{1}⌋ + ⌊x_{2}⌋ + ⋯ + ⌊x_{n−1}⌋ ,
a_{n−1} = ⌊x_{n}⌋ , and
c_{n−1} = a_{n−1} + b_{n−1}.

We apply (3) to (14) to obtain

0 ≤ s_{1} ≤ 1 if n is odd, and −1 ≤ s_{1} ≤ 0 if n is even.

Similarly, applying (3) to (16), we see that such sum lies in [0, 1] if n is even, and lies in [−1, 0] if n is odd. Therefore

0 ≤ s_{2} ≤ \binom{n − 1}{n − 2} if n is even, and − \binom{n − 1}{n − 2} ≤ s_{2} ≤ 0 if n is odd.

In general, for each 1 ≤ ℓ ≤ n − 1, we have

0 ≤ s_{ℓ} ≤ \binom{n − 1}{n − ℓ}, if n and ℓ have the same parity,

−\binom{n − 1}{n − ℓ} ≤ s_{ℓ} ≤ 0, if n and ℓ have a different parity.

Since g(x_{1}, x_{2}, …, x_{n}) = ∑_{1≤ℓ≤n−1} s_{ℓ}, we obtain, for odd n,

− ∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is even \end{matrix}} \binom{n − 1}{n − ℓ} ≤ g(x_{1}, x_{2}, …, x_{n}) ≤ ∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is odd \end{matrix}} \binom{n − 1}{n − ℓ},

and for even n,

− ∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is odd \end{matrix}} \binom{n − 1}{n − ℓ} ≤ g(x_{1}, x_{2}, …, x_{n}) ≤ ∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is even \end{matrix}} \binom{n − 1}{n − ℓ}.

Recall a well known identity

∑_{\begin{matrix}0≤k≤n \\ k is even \end{matrix}} \binom{n}{k} = ∑_{\begin{matrix}0≤k≤n \\ k is odd \end{matrix}} \binom{n}{k} = 2^{n−1}.

Therefore if n is odd, then

∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is odd \end{matrix}} \binom{n − 1}{n − ℓ} = ∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is even \end{matrix}} \binom{n − 1}{ℓ} = 2^{n−2} − 1, and

∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is even \end{matrix}} \binom{n − 1}{n − ℓ} = ∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is odd \end{matrix}} \binom{n − 1}{ℓ} = ∑_{\begin{matrix}0≤ℓ≤n−1 \\ ℓ is odd \end{matrix}} \binom{n − 1}{ℓ} = 2^{n−2}.

Similarly, if n is even, then

∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is odd \end{matrix}} \binom{n − 1}{n − ℓ} = 2^{n−2} and ∑_{\begin{matrix}1≤ℓ≤n−1 \\ ℓ is even \end{matrix}} \binom{n − 1}{n − ℓ} = 2^{n−2} − 1.

Hence −2^{n−2} ≤ g(x_{1}, x_{2}, …, x_{n}) ≤ 2^{n−2} − 1, as required. Next we show that the lower bound −2^{n−2} and the upper bound 2^{n−2} − 1 are actually the minimum and the maximum of g(x_{1}, x_{2}, …, x_{n}), respectively. Recall that the fractional part of a real number x, denoted by \{x\}, is defined by \{x\} = x − ⌊x⌋. Let x_{k} = \frac{1}{2} for every k = 1, 2, …, n. Then

g(x_{1}, x_{2}, …, x_{n}) = ∑_{1≤k≤n}(−1)^{k−1} ⌊\frac{k}{2}⌋ \binom{n}{k}

= ∑_{1≤k≤n}(−1)^{k−1} (\frac{k}{2}) \binom{n}{k} − ∑_{1≤k≤n}(−1)^{k−1} \{\frac{k}{2}\} \binom{n}{k}

= \frac{1}{2} ∑_{1≤k≤n}(−1)^{k−1}k\binom{n}{k} − \frac{1}{2} ∑_{\begin{matrix}1≤k≤n \\ k is odd \end{matrix}} \binom{n}{k},  (19)

where the last equality is obtained from the fact that \{\frac{k}{2}\} = 0 if k is even and \{\frac{k}{2}\} = \frac{1}{2} if k is odd. By differentiating both sides of

(1 + x)^{n} = ∑_{k=0}^{n} \binom{n}{k}x^{k}  (20)

and substituting x = −1, we obtain a well-known identity

∑_{k=1}^{n}(−1)^{k−1}k\binom{n}{k} = 0, which holds for all n ≥ 2.  (21)

In addition, we know that

∑_{\begin{matrix}1≤k≤n \\ k is odd \end{matrix}} \binom{n}{k} = 2^{n−1}.

Therefore (19) becomes

g(x_{1}, x_{2}, …, x_{n}) = 0 − \frac{1}{2} (2^{n−1}) = −2^{n−2}.

This shows that −2^{n−2} is the minimun value of g. Next let x_{k} = \frac{1}{2} − \frac{1}{n^{2}} for every k = 1, 2, …, n. Then

g(x_{1}, x_{2}, …, x_{n}) = ∑_{1≤k≤n}(−1)^{k−1} ⌊\frac{k}{2} − \frac{k}{n^{2}} ⌋ \binom{n}{k}.  (22)

If 1 ≤ k ≤ n and k is even, then ⌊\frac{k}{2} − \frac{k}{n^{2}} ⌋ = \frac{k}{2} − 1 = ⌊\frac{k−1}{2}⌋. If 1 ≤ k ≤ n and k is odd, then ⌊\frac{k}{2} − \frac{k}{n^{2}} ⌋ = ⌊\frac{k−1}{2} + \frac{1}{2} − \frac{k}{n^{2}} ⌋ = ⌊\frac{k−1}{2}⌋. Therefore (22) becomes

g(x_{1}, x_{2}, …, x_{n}) = ∑_{1≤k≤n}(−1)^{k−1} ⌊\frac{k − 1}{2}⌋ \binom{n}{k}.  (23)

Now we can evaluate the sum (23) by using the same method as in (19). We write ⌊\frac{k−1}{2}⌋ = \frac{k−1}{2} − \{\frac{k−1}{2}\} and we know that \{\frac{k−1}{2}\} = 0 if k is odd and \{\frac{k−1}{2}\} = \frac{1}{2} if k is even. Then (23) can be written as

g(x_{1}, x_{2}, …, x_{n}) = \frac{1}{2} ∑_{1≤k≤n}(−1)^{k−1}k\binom{n}{k} − \frac{1}{2} ∑_{1≤k≤n}(−1)^{k−1}\binom{n}{k} + \frac{1}{2} ∑_{\begin{matrix}1≤k≤n \\ k is even \end{matrix}} \binom{n}{k}.

The first sum is zero by (21). The second sum is 1 by substituting x = −1 in (20). Therefore

g(x_{1}, x_{2}, …, x_{n}) = 0 − \frac{1}{2} + \frac{1}{2} (2^{n−1} − 1) = 2^{n−2} − 1.

Recall that the Binet forms of Jacobsthal numbers J_{n} and Jacobsthal-Lucas numbers j_{n} are

J_{n} = \frac{2^{n} − (−1)^{n}}{3} and j_{n} = 2^{n} + (−1)^{n}  (24)

for every n ≥ 0. Therefore we obtain the connection between Jacobsthal and Jacobsthal-Lucas numbers and sums introduced by Jacobsthal [4] and Tverberg [6] as follows.

Corollary 5. If n is odd, then the maximum and the minimum value of g(x_{1}, x_{2}, x_{3}, …, x_{n}) are j_{n−2} and −1−j_{n−2}, respectively. If n is even, then the maximum and the minimum value of g(x_{1}, x_{2}, x_{3}, …, x_{n}) are 3J_{n−2} and 1 − j_{n−2}, respectively.

Proof. This follows immediately from (24) and Theorem 4.

Remark 6. From this point on, we will apply the well-known identities which are already recalled without reference.

Next we give the extreme values of f_{a_{1},a_{2},...,a_{ℓ};m}(k). Although we can write f_{a_{1},a_{2},...,a_{ℓ};m}(k) in terms of g(x_{1}, x_{2}, …, x_{n}) as given in Proposition 3, we do not know the proof which applies Theorem 4 to obtain Theorem 8. Nevertheless, we can use the same idea in the proof of Theorem 4 together with the following lemma to prove Theorem 8.

Lemma 7. The following statements hold.

(i) For each i ∈ {1, 2, …, n} and q ∈ ℤ, we have

g(x_{1}, x_{2}, …, x_{i} + q, …, x_{n}) = g(x_{1}, x_{2}, …, x_{n}).

In particular, g has period 1 in each variable.

(ii) For each i ∈ {1, 2, …, ℓ} and q ∈ ℤ, we have

f_{a_{1},a_{2},...,a_{i}+qm,...,a_{ℓ};m}(k) = f_{a_{1},a_{2},...,a_{ℓ};m}(k) = f_{a_{1},a_{2},...,a_{ℓ};m}(k + qm).

In particular, f has period m in each variable a_{1}, a_{2}, …, a_{ℓ} and k.

Proof. Since ⌊q + x⌋ = q + ⌊x⌋ for every q ∈ ℤ and x ∈ ℝ, we see that

g(x_{1}, x_{2}, …, x_{i} + q, …, x_{n}) = (q + ∑_{i=1}^{n}⌊x_{i}⌋) − (\binom{n − 1}{1}q + ∑_{1≤i_{1}<i_{2}≤n} ⌊x_{i_{1}} + x_{i_{2}}⌋)

+ (\binom{n − 1}{2}q + ∑_{1≤i_{1}<i_{2}<i_{3}≤n} ⌊x_{i_{1}} + x_{i_{2}} + x_{i_{3}}⌋)

− ⋯ + (−1)^{n−1} (\binom{n − 1}{n − 1}q + ⌊x_{1} + x_{2} + ⋯ + x_{n}⌋)

= g(x_{1}, x_{2}, …, x_{n}) + q ∑_{0≤k≤n−1}(−1)^{k}\binom{n − 1}{k}

= g(x_{1}, x_{2}, …, x_{n}).

This proves (i). Next we prove (ii). By Proposition 3 and by (i), we obtain

f_{a_{1},a_{2},...,a_{i}+qm,...,a_{ℓ};m}(k) = (−1)^{ℓ}g (\frac{a_{1}}{m}, \frac{a_{2}}{m}, …, \frac{a_{i}}{m} + q, …, \frac{a_{ℓ}}{m}, \frac{k}{m})

+ (−1)^{ℓ−1}g (\frac{a_{1}}{m}, \frac{a_{2}}{m}, …, \frac{a_{i}}{m} + q, …, \frac{a_{ℓ}}{m})

= (−1)^{ℓ}g (\frac{a_{1}}{m}, \frac{a_{2}}{m}, …, \frac{a_{ℓ}}{m}, \frac{k}{m}) + (−1)^{ℓ−1}g (\frac{a_{1}}{m}, \frac{a_{2}}{m}, …, \frac{a_{ℓ}}{m})

= f_{a_{1},a_{2},...,a_{ℓ};m}(k).

Similarly, f_{a_{1},a_{2},...,a_{ℓ};m}(k + qm) = f_{a_{1},a_{2},...,a_{ℓ};m}(k). This completes the proof.

Theorem 8. For each ℓ ≥ 2, a_{1}, a_{2}, …, a_{ℓ}, k ∈ ℤ and m ≥ 1, we have

−2^{ℓ−2} ≤ f_{a_{1},a_{2},...,a_{ℓ};m}(k) ≤ 2^{ℓ−2}.

Moreover, −2^{ℓ−2} and 2^{ℓ−2} are best possible in the sense that there are a_{1}, a_{2}, …, a_{ℓ}, m, k which make the inequality becomes equality. More precisely the following statements hold.

(i) If ℓ is odd, m is even, and a_{i} = \frac{m}{2} for every i = 1, 2, …, ℓ, then f_{a_{1},a_{2},...,a_{ℓ};m}(0) = −2^{ℓ−2} and f_{a_{1},a_{2},...,a_{ℓ};m}(\frac{m}{2}) = 2^{ℓ−2}.

(ii) If ℓ is even, m is even, and a_{i} = \frac{m}{2} for every i = 1, 2, …, ℓ, then f_{a_{1},a_{2},...,a_{ℓ};m}(0) = 2^{ℓ−2} and f_{a_{1},a_{2},...,a_{ℓ};m}(\frac{m}{2}) = −2^{ℓ−2}.

Proof. By Lemma 7, we can assume that a_{i} ∈ [0, m − 1] for every 1 ≤ i ≤ ℓ. Therefore

⌊\frac{a_{i}}{m}⌋ = 0 for every i ∈ \{1, 2, …, ℓ\}.  (25)

If ℓ = 2, then the result follows from (25) and (3), and we have

0 ≤ ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ − ⌊\frac{a_{1} + k}{m} ⌋ ≤ 1,  (26)

and

−1 ≤ − ⌊\frac{a_{2} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ ≤ 0.  (27)

Summing (26) and (27), we obtain −1 ≤ f_{a_{1},a_{2};m}(k) ≤ 1. The result when ℓ ≥ 3 is based on a careful selection of pairs and the case ℓ = 2. For illustration purpose, we first give a proof for the case ℓ = 3 and ℓ = 4. Recall that

f_{a_{1},a_{2},a_{3};m}(k) = ⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{2} + a_{3} + k}{m} ⌋

+ ⌊\frac{a_{1} + k}{m} ⌋ + ⌊\frac{a_{2} + k}{m} ⌋ + ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ .

We obtain by (3) and (25) that

0 ≤ ⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ ≤ 1,  (28)

−1 ≤ − ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{1} + k}{m} ⌋ ≤ 0,  (29)

−1 ≤ − ⌊\frac{a_{2} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{2} + k}{m} ⌋ ≤ 0,  (30)

0 ≤ ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ ≤ 1.  (31)

Summing (28), (29), (30), and (31), we see that the middle term is f_{a_{1},a_{2},a_{3},m}(k). Therefore −2 ≤ f_{a_{1},a_{2},a_{3};m}(k) ≤ 2. Next we consider

f_{a_{1},a_{2},a_{3},a_{4};m}(k) = ⌊\frac{a_{1} + a_{2} + a_{3} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + a_{4} + k}{m} ⌋

− ⌊\frac{a_{1} + a_{3} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{2} + a_{3} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{1} + a_{2} + k}{m} ⌋

+ ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{1} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{2} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{2} + a_{4} + k}{m} ⌋

+ ⌊\frac{a_{3} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{1} + k}{m} ⌋ − ⌊\frac{a_{2} + k}{m} ⌋ − ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{a_{4} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ .

Again, we obtain by (3) and (25) the following inequalities:

0 ≤ ⌊\frac{a_{1} + a_{2} + a_{3} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋ ≤ 1,  (32)

−1 ≤ − ⌊\frac{a_{1} + a_{2} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ ≤ 0,  (33)

−1 ≤ − ⌊\frac{a_{1} + a_{3} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ ≤ 0,  (34)

−1 ≤ − ⌊\frac{a_{2} + a_{3} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{2} + a_{3} + k}{m} ⌋ ≤ 0,  (35)

0 ≤ ⌊\frac{a_{1} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{1} + k}{m} ⌋ ≤ 1,  (36)

0 ≤ ⌊\frac{a_{2} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{2} + k}{m} ⌋ ≤ 1,  (37)

0 ≤ ⌊\frac{a_{3} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{3} + k}{m} ⌋ ≤ 1,  (38)

−1 ≤ − ⌊\frac{a_{4} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ ≤ 0.  (39)

Summing (32) to (39), we see that −4 ≤ f_{a_{1},a_{2},a_{3},a_{4},m}(k) ≤ 4.

Next we prove the general case ℓ ≥ 5. The expression of the form ⌊\frac{a_{i_{1}}+a_{i_{2}}+···+a_{ir} +k}{m}⌋ will

be called an r-bracket. So for each 1 ≤ r ≤ ℓ, there are \binom{ℓ}{r} r-brackets appearing in the sum defining f_{a_{1},a_{2},...,a_{ℓ};m}(k). We follow closely the method used in the proof of Theorem 4. So we first pair up the ℓ-bracket with an (ℓ − 1)-bracket as follows:

s_{1} = ⌊\frac{a_{1} + a_{2} + ⋯ + a_{ℓ} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + ⋯ + a_{ℓ−1} + k}{m} ⌋ ,  (40)

and we can apply (3) and (25) to obtain the bound for s_{1}. Next we pair up the remaining (ℓ − 1)-brackets with (ℓ − 2)-brackets as follows:

− ⌊\frac{a_{i_{1}} + a_{i_{2}} + ⋯ + a_{i_{ℓ−1}} + k}{m} ⌋ + ⌊\frac{a_{i_{1}} + a_{i_{2}} + ⋯ + a_{i_{ℓ−2}} + k}{m} ⌋ ,  (41)

and we sum (41) over all 1 ≤ i_{1} < i_{2} < … < i_{ℓ−1} ≤ ℓ and call it s_{2}. Since a_{ℓ} does not appear in the second term on the right hand side of (40), the term a_{i_{ℓ−1}} appearing in (41) is always a_{ℓ}. So in fact

s_{2} = − ∑_{1≤i_{1}<i_{2}<...<i_{ℓ−2}<ℓ} ⌊\frac{a_{i_{1}} + a_{i_{2}} + ⋯ + a_{i_{ℓ−2}} + a_{ℓ} + k}{m} ⌋

+ ∑_{1≤i_{1}<i_{2}<...<i_{ℓ−2}<ℓ} ⌊\frac{a_{i_{1}} + a_{i_{2}} + ⋯ + a_{i_{ℓ−2}} + k}{m} ⌋ .

We continue doing this process as follows. For each 1 ≤ r ≤ ℓ, let c_{r} be the sum of all ⌊\frac{a_{i_{1}}+a_{i_{2}}+···+a_{ir} +k}{m}⌋ with 1 ≤ i_{1} < i_{2} < ⋯ < i_{r} ≤ ℓ, a_{r} the sum of all such terms with i_{r} = ℓ, and b_{r} the sum of all such terms with i_{r} < ℓ. Therefore c_{r} = a_{r} +b_{r}, the number of summands of c_{r} is \binom{ℓ}{r}, the number of summands of a_{r} is \binom{ℓ−1}{r−1}, and the number of summands of b_{r} is \binom{ℓ−1}{r}. As usual, the empty sum is defined to be zero, so b_{ℓ} = 0. We have s_{1} = a_{ℓ} − b_{ℓ−1} and s_{2} = −a_{ℓ−1} + b_{ℓ−2}. In general, for each 1 ≤ r ≤ ℓ − 1, we let

s_{r} = (−1)^{r+1}a_{ℓ−r+1} + (−1)^{r}b_{ℓ−r} and s_{ℓ} = (−1)^{ℓ+1}a_{1} + (−1)^{ℓ} ⌊\frac{k}{m}⌋ .

Then

0 ≤ s_{r} ≤ \binom{ℓ − 1}{ℓ − r} if r is odd, and − \binom{ℓ − 1}{ℓ − r} ≤ s_{r} ≤ 0 if r is even,

∑_{1≤r≤ℓ} s_{r} = a_{ℓ} + ∑_{2≤r≤ℓ−1}(−1)^{r+1}a_{ℓ−r+1} + ∑_{1≤r≤ℓ−2}(−1)^{r}b_{ℓ−r} + (−1)^{ℓ−1}b_{1} + s_{ℓ}

= a_{ℓ} + ∑_{1≤r≤ℓ−2}(−1)^{r}(a_{ℓ−r} + b_{ℓ−r}) + (−1)^{ℓ−1}b_{1} + (−1)^{ℓ+1}a_{1} + ⌊\frac{k}{m}⌋

= c_{ℓ} + ∑_{1≤r≤ℓ−2}(−1)^{r}c_{ℓ−r} + (−1)^{ℓ−1}c_{1} + ⌊\frac{k}{m}⌋

= ∑_{0≤r≤ℓ−1}(−1)^{r}c_{ℓ−r} + ⌊\frac{k}{m}⌋

= f_{a_{1},a_{2},...,a_{ℓ};m}(k).

Therefore

− ∑_{\begin{matrix}1≤r≤ℓ \\ r is even \end{matrix}} \binom{ℓ − 1}{ℓ − r} ≤ f_{a_{1},a_{2},...,a_{ℓ};m}(k) ≤ ∑_{\begin{matrix}1≤r≤ℓ \\ r is odd \end{matrix}} \binom{ℓ − 1}{ℓ − r}.

Replacing r by r + 1, we see that

∑_{\begin{matrix}1≤r≤ℓ \\ r is odd \end{matrix}} \binom{ℓ − 1}{ℓ − r} = ∑_{\begin{matrix}0≤r≤ℓ−1 \\ r is even \end{matrix}} \binom{ℓ − 1}{ℓ − 1 − r} = 2^{ℓ−2}.

Similarly,

− ∑_{\begin{matrix}1≤r≤ℓ \\ r is even \end{matrix}} \binom{ℓ − 1}{ℓ − r} = −2^{ℓ−2}.

Therefore

−2^{ℓ−2} ≤ f_{a_{1},a_{2},...,a_{ℓ};m}(k) ≤ 2^{ℓ−2},  (42)

as required. If ℓ is odd, m is even, and a_{i} = \frac{m}{2} for every 1 ≤ i ≤ ℓ, we obtain by Proposition 3 and Theorem 4 that f_{a_{1},a_{2},...,a_{ℓ};m}(0) = g (\frac{1}{2}, \frac{1}{2}, …, \frac{1}{2}) = −2^{ℓ−2}and f_{a_{1},a_{2},...,a_{ℓ};m}(\frac{m}{2}) = (−1)^{ℓ}g (\frac{1}{2}, \frac{1}{2}, …, \frac{1}{2}) + (−1)^{ℓ−1}g (\frac{1}{2}, \frac{1}{2}, …, \frac{1}{2}) = 2^{ℓ−2} . If ℓ is even, m is even, and a_{i} = \frac{m}{2} for every 1 ≤ i ≤ ℓ, we obtain similarly that f_{a_{1},a_{2},...,a_{ℓ};m}(0) = 2^{ℓ−2} and f_{a_{1},a_{2},...,a_{ℓ};m}(\frac{m}{2}) = −2^{ℓ−2}. So 2^{ℓ−2} and −2^{ℓ−2} in (42) cannot be improved. This completes The proof.

We obtain the extreme values of S_{a_{1},a_{2},...,a_{ℓ};m} for some cases ℓ ≥ 4 as well. More precisely, we have the following result.

Theorem 9. For each ℓ ≥ 2, a_{1}, a_{2}, …, , a_{ℓ} ∈ ℤ, m ∈ ℕ, and K ∈ ℕ ∪ {0}, we have

−2^{ℓ−2} ⌊\frac{m}{2}⌋ ≤ S_{a_{1},a_{2},...,a_{ℓ};m}(K) ≤ 2^{ℓ−2} ⌊\frac{m}{2}⌋ .  (43)

Moreover, If ℓ is odd, then the lower bound −2^{ℓ−2} ⌊\frac{m}{2}⌋ is sharp and if ℓ is even, then the upper bound 2^{ℓ−2} ⌊\frac{m}{2}⌋ is sharp in the sense that there are a_{1}, a_{2}, …, a_{ℓ}, m, k which make the inequality becomes equality. More precisely, the following statements hold.

(i) If ℓ is odd, m is even, and a_{i} = \frac{m}{2} for every i = 1, 2, …, ℓ, then S_{a_{1},a_{2},...,a_{ℓ};m}(K) = −2^{ℓ−2} ⌊\frac{m}{2}⌋.

(ii) If ℓ is even, m is even, and a_{i} = \frac{m}{2} for every i = 1, 2, …, ℓ, then S_{a_{1},a_{2},...,a_{ℓ};m}(K) = 2^{ℓ−2} ⌊\frac{m}{2}⌋.

Proof. If ℓ = 2, then the result is already proved by Jacobsthal [4]. See also another proof by Tverberg [6]. We recall the result when ℓ = 2 for easy reference as follows:

0 ≤ S_{a,b;m}(K) ≤ ⌊\frac{m}{2}⌋ .  (44)

As before the result when ℓ ≥ 3 is based on the case ℓ = 2 and a careful selection of pairs, and we first illustrate the idea by giving the proof for the case ℓ = 3 and ℓ = 4. Recall that

f_{a_{1},a_{2},a_{3};m}(k) = ⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{2} + a_{3} + k}{m} ⌋

+ ⌊\frac{a_{1} + k}{m} ⌋ + ⌊\frac{a_{2} + k}{m} ⌋ + ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ .

We have

f_{a_{1}+a_{2},a_{3};m}(k) = ⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ − ⌊\frac{a_{3} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ ,  (45)

−f_{a_{1},a_{3};m}(k) = − ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{1} + k}{m} ⌋ + ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ ,  (46)

−f_{a_{2},a_{3};m}(k) = − ⌊\frac{a_{2} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{2} + k}{m} ⌋ + ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ .  (47)

Summing (45), (46), and (47), we see that

f_{a_{1},a_{2},a_{3};m}(k) = f_{a_{1}+a_{2},a_{3};m}(k) − f_{a_{1},a_{3};m}(k) − f_{a_{2},a_{3};m}(k).  (48)

By the definition of S_{a_{1},a_{2},a_{3};m}(K), (48), and (44), we obtain

S_{a_{1},a_{2},a_{3};m}(K) = ∑_{k=0}^{K} f_{a_{1},a_{2},a_{3};m}(k)

= ∑_{k=0}^{K} f_{a_{1}+a_{2},a_{3};m}(k) − ∑_{k=0}^{K} f_{a_{1},a_{3};m}(k) − ∑_{k=0}^{K} f_{a_{2},a_{3};m}(k)

= S_{a_{1}+a_{2},a_{3};m}(K) − S_{a_{1},a_{3};m}(K) − S_{a_{2},a_{3};m}(K)

≥ 0 − ⌊\frac{m}{2}⌋ − ⌊\frac{m}{2}⌋ = −2 ⌊\frac{m}{2}⌋ .

Similarly,

S_{a_{1},a_{2},a_{3};m}(K) ≤ ⌊\frac{m}{2}⌋ − 0 − 0 = ⌊\frac{m}{2}⌋ ≤ 2 ⌊\frac{m}{2}⌋ .

Similarly, we have the following equalities:

f_{a_{1}+a_{2}+a_{3},a_{4};m}(k) = ⌊\frac{a_{1} + a_{2} + a_{3} + a_{4} + k}{m} ⌋−⌊\frac{a_{1} + a_{2} + a_{3} + k}{m} ⌋−⌊\frac{a_{4} + k}{m} ⌋+⌊\frac{k}{m}⌋ , (49)
−f_{a_{1}+a_{2},a_{4};m}(k) = − ⌊\frac{a_{1} + a_{2} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{1} + a_{2} + k}{m} ⌋ + ⌊\frac{a_{4} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ ,  (50)
−f_{a_{1}+a_{3},a_{4};m}(k) = − ⌊\frac{a_{1} + a_{3} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{1} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{4} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ ,  (51)
−f_{a_{2}+a_{3},a_{4};m}(k) = − ⌊\frac{a_{2} + a_{3} + a_{4} + k}{m} ⌋ + ⌊\frac{a_{2} + a_{3} + k}{m} ⌋ + ⌊\frac{a_{4} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ ,  (52)
f_{a_{1},a_{4};m}(k) = ⌊\frac{a_{1} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{1} + k}{m} ⌋ − ⌊\frac{a_{4} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ ,  (53)
f_{a_{2},a_{4};m}(k) = ⌊\frac{a_{2} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{2} + k}{m} ⌋ − ⌊\frac{a_{4} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ ,  (54)
f_{a_{3},a_{4};m}(k) = ⌊\frac{a_{3} + a_{4} + k}{m} ⌋ − ⌊\frac{a_{3} + k}{m} ⌋ − ⌊\frac{a_{4} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ .  (55)

Summing (49) to (55) and recalling the definition of f_{a_{1},a_{2},a_{3},a_{4};m}(k), we see that

f_{a_{1},a_{2},a_{3},a_{4};m}(k) = f_{a_{1}+a_{2}+a_{3},a_{4};m}(k) − f_{a_{1}+a_{2},a_{4};m}(k) − f_{a_{1}+a_{3},a_{4};m}(k) − f_{a_{2}+a_{3},a_{4};m}(k)
+ f_{a_{1},a_{4};m}(k) + f_{a_{2},a_{4};m}(k) + f_{a_{3},a_{4};m}(k).  (56)

Then we obtain from (56) and (44) that

S_{a_{1},a_{2},a_{3},a_{4};m}(K) = S_{a_{1}+a_{2}+a_{3},a_{4};m}(K) − S_{a_{1}+a_{2},a_{4};m}(K) − S_{a_{1}+a_{3},a_{4};m}(K) − S_{a_{2}+a_{3},a_{4};m}(K)

+ S_{a_{1},a_{4};m}(K) + S_{a_{2},a_{4};m}(K) + S_{a_{3},a_{4};m}(K)

≤ ⌊\frac{m}{2}⌋ − 0 − 0 − 0 + ⌊\frac{m}{2}⌋ + ⌊\frac{m}{2}⌋ + ⌊\frac{m}{2}⌋ = 4 ⌊\frac{m}{2}⌋ .

Similarly, S_{a_{1},a_{2},a_{3},a_{4};m}(K) ≥ −4 ⌊\frac{m}{2}⌋. Next we prove the general case ℓ ≥ 5. The expression of the form ⌊\frac{a_{i_{1}}+a_{i_{2}}+···+a_{ir} +k}{m}⌋ will be called an r-bracket. So for each 0 ≤ r ≤ ℓ, there are \binom{ℓ}{r} r-brackets appearing in the sum defining f_{a_{1},a_{2},...,a_{ℓ};m}(k). We first pair up the ℓ-bracket with an (ℓ − 1)-bracket, a 1-bracket and a 0-bracket as follows:

s_{1}(k) = ⌊\frac{a_{1} + a_{2} + ⋯ + a_{ℓ} + k}{m} ⌋ − ⌊\frac{a_{1} + a_{2} + ⋯ + a_{ℓ−1} + k}{m} ⌋ − ⌊\frac{a_{ℓ} + k}{m} ⌋ + ⌊\frac{k}{m}⌋ . (57)

So s_{1}(k) is in fact f_{a_{1}+a_{2}+···+a_{ℓ−1},a_{ℓ};m}(k) and we can apply (44) to obtain the inequality

0 ≤ S_{a_{1}+a_{2}+···+a_{ℓ−1},a_{ℓ};m}(K) = ∑_{k=0}^{K} s_{1}(k) ≤ ⌊\frac{m}{2}⌋ .

Next we pair up the remaining (ℓ−1)-brackets with (ℓ−2)-brackets, 1-brackets and 0-brackets as follows:

− ⌊\frac{a_{i_{1}} + a_{i_{2}} + ⋯ + a_{i_{ℓ−1}} + k}{m} ⌋ + ⌊\frac{a_{i_{1}} + a_{i_{2}} + ⋯ + a_{i_{ℓ−2}} + k}{m} ⌋ + ⌊\frac{a_{i_{ℓ−1}} + k}{m} ⌋ − ⌊\frac{k}{m}⌋ , (58)

and we sum (58) over all 1 ≤ i_{1} < i_{2} < ⋯ < i_{ℓ−1} ≤ ℓ and call it s_{2}(k). Since a_{ℓ} does not appear in the second term on the right hand side of (57), the term a_{i_{ℓ−1}} appearing in (58) is always a_{ℓ}. So in fact (58) is −f_{a_{i_{1}}+a_{i_{2}}+···+a_{i_{ℓ−2}},a_{ℓ};m}(k) and

s_{2}(k) = − ∑_{1≤i_{1}<i_{2}<...<i_{ℓ−2}<ℓ} f_{a_{i_{1}}+a_{i_{2}}+···+a_{i_{ℓ−2}},a_{ℓ};m}(k)

Furthermore,

∑_{k=0}^{K} s_{2}(k) = − ∑_{1≤i_{1}<i_{2}<...<i_{ℓ−2}<ℓ} S_{a_{i_{1}}+a_{i_{2}}+···+a_{i_{ℓ−2}},a_{ℓ};m}(K) ≤ 0,

where the last inequality is obtained from (44). We continue doing this process and follow closely the method used in the proof of Theorems 4 and 8. The well-known identities previously recalled will be applied without reference. For each 1 ≤ r ≤ ℓ, let c_{r}(k) be the sum of all ⌊\frac{a_{i_{1}}+a_{i_{2}}+···+a_{ir} +k}{m}⌋ with 1 ≤ i_{1} < i_{2} < ⋯ < i_{r} ≤ ℓ, a_{r}(k) the sum of all such terms with i_{r} = ℓ, and b_{r}(k) the sum of all such terms with i_{r} < ℓ. Therefore c_{r}(k) = a_{r}(k) + b_{r}(k), the number of r-brackets appearing in the sum defining c_{r}(k) is \binom{ℓ}{r}, the number of r-brackets appearing in the sum defining a_{r}(k) is \binom{ℓ−1}{r−1}, and the number of r-brackets appearing in the sum defining b_{r}(k) is \binom{ℓ−1}{r}. As usual, the empty sum is defined to be zero, so b_{ℓ}(k) = 0. We have s_{1}(k) = a_{ℓ}(k) − b_{ℓ−1}(k) − a_{1}(k) + ⌊\frac{k}{m}⌋ and s_{2}(k) = −a_{ℓ−1}(k) + b_{ℓ−2}(k) + \binom{ℓ−1}{ℓ−2}a_{1}(k) − \binom{ℓ−1}{ℓ−2} ⌊\frac{k}{m}⌋. In general, for each 1 ≤ r ≤ ℓ − 1, we let

s_{r}(k) = (−1)^{r+1}a_{ℓ−r+1}(k) + (−1)^{r}b_{ℓ−r}(k) + (−1)^{r}\binom{ℓ − 1}{ℓ − r}a_{1}(k) + (−1)^{r+1}\binom{ℓ − 1}{ℓ − r} ⌊\frac{k}{m}⌋

= (−1)^{r+1} ∑_{1≤i_{1}<i_{2}<...<i_{ℓ−r}<ℓ} f_{a_{i_{1}}+a_{i_{2}}+···+a_{i_{ℓ−r}} ,a_{ℓ};m}(k).

Then

∑_{k=0}^{K} s_{r}(k) = (−1)^{r+1} ∑_{1≤i_{1}<i_{2}<...<i_{ℓ−r}<ℓ} S_{a_{i_{1}}+a_{i_{2}}+···+a_{i_{ℓ−r}} ,a_{ℓ};m}(K).

So by (44), we see that

0 ≤ ∑_{k=0}^{K} s_{r}(k) ≤ \binom{ℓ − 1}{ℓ − r} ⌊\frac{m}{2}⌋ if r is odd, and − \binom{ℓ − 1}{ℓ − r} ⌊\frac{m}{2}⌋ ≤ ∑_{k=0}^{K} s_{r}(k) ≤ 0 if r is even.

Similar to the proof of Theorems 4 and 8, we obtain

∑_{1≤r≤ℓ−1} s_{r}(k) = a_{ℓ} + ∑_{2≤r≤ℓ−1}(−1)^{r+1}a_{ℓ−r+1} + ∑_{1≤r≤ℓ−2}(−1)^{r}b_{ℓ−r} + (−1)^{ℓ−1}b_{1}

+ (−1)^{ℓ+1}a_{1} + (−1)^{ℓ} ⌊\frac{k}{m}⌋

= a_{ℓ} + ∑_{1≤r≤ℓ−2}(−1)^{r}(a_{ℓ−r} + b_{ℓ−r}) + (−1)^{ℓ−1}b_{1} + (−1)^{ℓ+1}a_{1} + (−1)^{ℓ} ⌊\frac{k}{m}⌋

= c_{ℓ} + ∑_{1≤r≤ℓ−2}(−1)^{r}c_{ℓ−r} + (−1)^{ℓ−1}c_{1} + (−1)^{ℓ} ⌊\frac{k}{m}⌋

= ∑_{0≤r≤ℓ−1}(−1)^{r}c_{ℓ−r} + (−1)^{ℓ} ⌊\frac{k}{m}⌋

= f_{a_{1},a_{2},...,a_{ℓ};m}(k).

Therefore

− ∑_{\begin{matrix}1≤r≤ℓ−1 \\ r is even \end{matrix}} \binom{ℓ − 1}{ℓ − r} ⌊\frac{m}{2}⌋ ≤ ∑_{k=0}^{K} f_{a_{1},a_{2},...,a_{ℓ};m}(k) ≤ ∑_{\begin{matrix}1≤r≤ℓ−1 \\ r is odd \end{matrix}} \binom{ℓ − 1}{ℓ − r} ⌊\frac{m}{2}⌋ .  (59)

The middle term in (59) is S_{a_{1},a_{2},...,a_{ℓ};m}(K). The left and right most terms in (59) are, respectively, equal to −2^{ℓ−2} ⌊\frac{m}{2}⌋ and 2^{ℓ−2} ⌊\frac{m}{2}⌋ which can be evaluated by the well-known identity previously recalled. This proves the first part of the theorem. Next we show that one of the upper bound or lower bound is sharp. Let C = {a_{1}, a_{2}, …, a_{ℓ}}. Suppose ℓ is odd, m is even, and a_{i} = \frac{m}{2} for every 1 ≤ i ≤ ℓ. Then we obtain by Proposition 3 and Theorem 4 that f_{C;m}(0) = g (\frac{1}{2}, \frac{1}{2}, …, \frac{1}{2}) = −2^{ℓ−2}. Let 0 < k < \frac{m}{2}. By the definition of f_{C;m}(k), we see that

f_{C;m}(k) = ∑_{T ⊆[1,ℓ]}(−1)^{ℓ−|T |} ⌊\frac{k}{m} + \frac{|T |}{2}⌋

= ∑_{r=0}^{ℓ}(−1)^{ℓ−r}\binom{ℓ}{r} ⌊\frac{k}{m} + \frac{r}{2}⌋  (60)

Since 0 < k < \frac{m}{2}, we have \frac{r}{2} < \frac{k}{m} + \frac{r}{2} < \frac{r+1}{2}. So if r is even, then ⌊\frac{k}{m} + \frac{r}{2}⌋ = \frac{r}{2} = ⌊\frac{r}{2}⌋ and if r is odd, then ⌊\frac{k}{m} + \frac{r}{2}⌋ = \frac{r−1}{2} = ⌊\frac{r}{2}⌋. In any case, ⌊\frac{k}{m} + \frac{r}{2}⌋ = \frac{r}{2} = ⌊\frac{0}{m} + \frac{r}{2}⌋. This implies that f_{C;m}(k) = f_{C;m}(0) for every k = 0, 1, 2, …, \frac{m}{2} − 1. Then

S_{C;m} (\frac{m}{2} − 1) = ∑_{k=0}^{\frac{m}{2} −1} f_{C;m}(k) = \frac{m}{2}f_{C;m}(0) = −2^{ℓ−2} ⌊\frac{m}{2}⌋

So −2^{ℓ−2} ⌊\frac{m}{2}⌋ in (43) cannot be improved when ℓ is odd. Next suppose ℓ is even, m is even, and a_{i} = \frac{m}{2} for every 1 ≤ i ≤ ℓ. Then we obtain similarly that f_{C;m}(k) = f_{C;m}(0) = 2^{ℓ−2} for every k = 0, 1, 2, …, \frac{m}{2} − 1. Then S_{C;m}(\frac{m}{2} − 1) = 2^{ℓ−2} ⌊\frac{m}{2}⌋ . So 2^{ℓ−2} ⌊\frac{m}{2}⌋ in (43) cannot be improved when ℓ is even. This completes the proof.

3 Acknowledgments

Kritkhajohn Onphaeng wishes to thank DPST (Development and Promotion of Science and Technology Talents) for giving him a scholarship. Prapanpong Pongsriiam receives financial support jointly from The Thailand Research Fund and Faculty of Science, Silpakorn University, grant number RSA5980040. Correspondence should be addressed to Prapanpong

Pongsriiam: prapanpong@gmail.com .

References

[1] L. Carlitz, An arithmetic sum connected with the greatest integer function, Norske Vid. Selsk. Forh. Trondheim 32 (1959), 24–30.

[2] L. Carlitz, Some arithmetic sums connected with the greatest integer function, Math Scand. 8 (1960), 59–64.

[3] R. C. Grimson, The evaluation of a sum of Jacobsthal, Norske Vid. Selsk. Skr. Trondheim (1974), No. 4.

[4] E. Jacobsthal, Über eine zahlentheoretische Summe, Norske Vid. Selsk. Forh. Trondheim 30 (1957), 35–41.

[5] N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences, https://oeis.org.

[6] H. Tverberg, On some number-theoretic sums introduced by Jacobsthal, Acta Arith. 155 (2012), 349–351.

2010 Mathematics Subject Classification: Primary 11A25; Secondary 11B37. Keywords: Jacobsthal sum, Jacobsthal number, Jacobsthal-Lucas number, floor function, sum.

(Concerned with sequences \underline{A001045} and \underline{A014551}.) Received September 28 2016; revised version received January 4 2017. Published in Journal of Integer Sequences, January 14 2017. Return to Journal of Integer Sequences home page.