Inequalities and Identities Involving Sums of Integer Functions

Mircea Merca Department of Informatics Constantin Istrati Technical College Griviţei 91, 105600 Campina Romania

                 mircea.merca@profinfo.edu.ro

Abstract

The aim of this paper is to present a method of generating inequalities and, under certain conditions, some identities with sums that involve floor, ceiling and round functions. We apply this method to sequences of nonnegative integers that could be turned into periodical sequences.

1 Introduction

The floor and ceiling functions map a real number to the largest previous or the smallest following integer, respectively. More precisely, the floor function ⌊x⌋ is the largest integer not greater than x and the ceiling function ⌈x⌉ is the smallest integer not less than x. Iverson [7, p. 127] introduced this notation and the terms floor and ceiling in the early 1960’s and now this notation is standard in most areas of mathematics. Many properties of floor and ceiling functions are presented in [1, 5].

If x, y are real numbers and n is an integer so that y − x < 1 and x ≤ n ≤ y then

⌈x⌉ = ⌊y⌋ = n .  (1)

For all integers m and all positive integers n the following identities can be used to convert floors to ceilings and vice-versa

⌈\frac{m}{n}⌉ = ⌊\frac{m + n − 1}{n}⌋ .  (2)

When m is integer and n is a positive integer the quotient of m divided by n is ⌊\frac{m}{n}⌋ and the value

m mod n = m − n ⌊\frac{m}{n}⌋

is the remainder (or residue) of the division.

If the integers a and b have the same remainder when divided by n (i.e., if n divides a−b) we say that a is congruent to b modulo n and we write

a ≡ b (mod n) .

The mod in a ≡ b (mod n) defines a binary relation, whereas the mod in a mod b is a binary operation.

The nearest integer function [x], also called nint or the round function, is the integer closest to x. Since this definition is ambiguous for half-integers, the additional rule is necessary to adopt. In this work, the nearest integer function is defined by

[x] = ⌊x + \frac{1}{2}⌋ .  (3)

If x is a real number and n is an integer so that |x − n| < \frac{1}{2} then

[x] = n .  (4)

In Section 2 we studied sums of the type ∑_{i=1}^{n} f (\frac{x_{i}}{m}) where m is a positive integer, (x_{n}) is a sequence of nonnegative integers such that there exists a positive integer p with x_{n+p} ≡ x_{n} (mod m), and f is either the floor, ceiling or the round functions. Our main results give lower and upper bounds for the difference between ∑_{i=1}^{n} f (\frac{x_{i}}{m}) and an adjusted version of ∑_{i=1}^{n} \frac{x_{i}}{m}. These results would allow one to obtain some further inequalities and identities for ∑_{i=1}^{n} f (\frac{x_{i}}{m}). As far as we know such an approach is new.

Section 3 is devoted to applications of these results to the three sequences: x_{n} = n^{k}, x_{n} = a^{n}, and the Fibonacci numbers F_{n} (k and a are positive integers). The examples presented in this section illustrate how computers can be used to discover mathematical inequalities or identities. Some identities, like

∑_{i=1}^{n} [\frac{i^{2k+1}}{3} ] = [\frac{1}{3} ∑_{i=1}^{n} i^{2k+1}] for all k ∈ ℕ

or

∑_{i=1}^{n} [\frac{i^{2k+1}}{4} ] = ⌊\frac{1}{4} ∑_{i=1}^{n} i^{2k+1}⌋ for all k ∈ ℕ

are proved in this way. Using computers to explore mathematical phenomena is not a new idea. Binomial coefficient identities, multiple hypergeometric integral/sum identities, and qidentities are investigated in [9]. Some Euler sum identities found by computer are presented in [2] and for the first time in history a significant new formula for π was discovered by a computer [3].

The calculations made in some of the examples presented in Section 3 allowed us to discover three conjectures in number theory. These are presented in Section 4.

Another reason of this paper is to solve a problem published in [8].

Problem 1. Let n be a nonnegative integer. Find the closed form of the sums

S_{1}(n) = ∑_{k=0}^{n} ⌊\frac{k^{2}}{12}⌋ and S_{2}(n) = ∑_{k=0}^{n} [\frac{k^{2}}{12}] ,

where ⌊x⌋ denotes the largest integer not greater than x and [x] denotes the nearest integer to x, i.e., [x] = ⌊x + \frac{1}{2}⌋.

2 Main results

Let m and p be positive integers, and let x = (x_{1}, x_{2}, x_{3}, …) = (x_{n})_{n>0} be a nonnegative integer sequence. We denote by M(m, n, x) the following arithmetic mean

M(m, n, x) = \frac{1}{n} ∑_{i=1}^{n} (x_{i} mod m) .

Then we introduce the following notations:

F (m, p, n, x) = \frac{1}{m} (∑_{i=1}^{n} x_{i} − n · M(m, p, x)) ,
G(m, p, n, x) = \frac{n}{m} (M(m, n, x) − M(m, p, x)) ,
L(m, p, x) = min {G(m, p, i, x) |i = 1, …, p} ,
R(m, p, x) = max {G(m, p, i, x) |i = 1, …, p} .

Theorem 1. Let m and p be positive integers, and let x = (x_{n})_{n>0} be a nonnegative integer sequence so that x_{n+p} ≡ x_{n} (mod m). Then

L(m, p, x) ≤ F (m, p, n, x) − ∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ ≤ R(m, p, x) .  (5)

Proof. Taking

⌊\frac{x_{i}}{m}⌋ = \frac{x_{i}}{m} − \frac{x_{i} mod m}{m}, i = 1, …, n

we have

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ = \frac{1}{m} (∑_{i=1}^{n} x_{i} − ∑_{i=1}^{n}(x_{i} mod m)) .  (6)

We can write

∑_{i=1}^{n}(x_{i} mod m) = ⌊\frac{n}{p}⌋ ∑_{i=1}^{p}(x_{i} mod m) + ∑_{i=1}^{n mod p}(x_{i} mod m)

= (\frac{n}{p} − \frac{n mod p}{p}) ∑_{i=1}^{p}(x_{i} mod m) + ∑_{i=1}^{n mod p}(x_{i} mod m)

= (n − n mod p) M(m, p, x) + ∑_{i=1}^{n mod p}(x_{i} mod m) .  (7)

By (6) and (7), we obtain

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ = F (m, p, n, x) − G_{1}(m, p, n, x) ,

where

G_{1}(m, p, n, x) = \frac{n mod p}{m} (M(m, n mod p, x) − M(m, p, x)) .

Noting that

G_{1}(m, p, n + p, x) = G_{1}(m, p, n, x)

and

G_{1}(m, p, i, x) = G(m, p, i, x) , i = 1, …, p

the inequality (5) is proved.

Theorem 2. Let m and p be positive integers, and let x = (x_{n})_{n>0} and y = (y_{n})_{n>0} be two sequences of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m) and y_{n} = x_{n} + m − 1. Then

L(m, p, y) ≤ F (m, p, n, y) − ∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ ≤ R(m, p, y) .  (8)

Proof. By (2) we deduce that

⌈\frac{x_{i}}{m}⌉ = ⌊\frac{y_{i}}{m}⌋ , i = 1, …, n .

Because y_{n+p} − y_{n} = x_{n+p} − x_{n} and x_{n+p} ≡ x_{n} (mod m), it follows that y_{n+p} ≡ y_{n} (mod m). Thus, the inequality (8) is a consequence of inequality (5).

Theorem 3. Let m and p be positive integers, and let x = (x_{n})_{n>0} and z = (z_{n})_{n>0} be two sequences of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m) and z_{n} = 2x_{n} + m. Then

L(2m, p, z) ≤ F (2m, p, n, z) − ∑_{i=1}^{n} [\frac{x_{i}}{m}] ≤ R(2m, p, z) .  (9)

Proof. Taking into account (3) we deduce that

[\frac{x_{i}}{m}] = ⌊\frac{z_{i}}{2m}⌋ , i = 1, …, n .

From z_{n+p} −z_{n} = 2(x_{n+p} −x_{n}) and x_{n+p} ≡ x_{n} (mod m), it follows that 2m divides z_{n+p} −z_{n}. We conclude that z_{n+p} ≡ z_{n} (mod 2m). So, the inequality (9) is a consequence of the inequality (5). The theorem is proved.

Note that for computing L(m, p, x) and R(m, p, x), we need only the remainders of the division by m of the first p terms from the sequence (x_{n})_{n>0}. Moreover, to determine F (m, p, n, x), we also need the sum of the first n terms from the sequence (x_{n})_{n>0}.

If we know the formula of calculating the sum ∑_{i=1}^{n} x_{i} or if we know methods to determine it, then the proved inequalities allow us to determine functions which approximate the sums ∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋, ∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ and ∑_{i=1}^{n} [\frac{x_{i}}{m}] or, in some situations, even to find formulas for these sums.

Corollary 4. Let m and p be positive integers, and let x = (x_{n})_{n>0} be a sequence of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m). Then

|F (m, p, n, x) − \frac{R(m, p, x) + L(m, p, x)}{2} − ∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋| ≤ \frac{R(m, p, x) − L(m, p, x)}{2} ,

|F (m, p, n, y) − \frac{R(m, p, y) + L(m, p, y)}{2} − ∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉| ≤ \frac{R(m, p, y) − L(m, p, y)}{2} ,

|F (2m, p, n, z) − \frac{R(2m, p, z) + L(2m, p, z)}{2} − ∑_{i=1}^{n} [\frac{x_{i}}{m}]| ≤ \frac{R(2m, p, z) − L(2m, p, z)}{2} ,

where y = (y_{n})_{n>0} = (x_{n} + m − 1)_{n>0}, z = (z_{n})_{n>0} = (2x_{n} + m)_{n>0}.

Proof. If from every member of the inequality (5) we subtract \frac{1}{2} (R(m, p, x) + L(m, p, x)), we obtain the first inequality. In the same way we obtain the other two inequalities.

Corollary 5. Let m and p be positive integers, and let x = (x_{n})_{n>0} be a sequence of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m). Then

⌈F (m, p, n, x) − R(m, p, x)⌉ ≤ ∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ ≤ ⌊F (m, p, n, x) − L(m, p, x)⌋ ,

⌈F (m, p, n, y) − R(m, p, y)⌉ ≤ ∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ ≤ ⌊F (m, p, n, y) − L(m, p, y)⌋ ,

⌈F (2m, p, n, z) − R(2m, p, z)⌉ ≤ ∑_{i=1}^{n} [\frac{x_{i}}{m}] ≤ ⌊F (2m, p, n, z) − L(2m, p, z)⌋ ,

where y = (y_{n})_{n>0} = (x_{n} + m − 1)_{n>0}, z = (z_{n})_{n>0} = (2x_{n} + m)_{n>0}.

Proof. To obtain the first inequality we have to subtract from each member of the inequality (5) F (m, p, n, x), then to multiply the members of the inequality by −1 and finally to take into account that ∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ is a nonnegative integer. We obtain the other two inequalities in the same manner.

Taking into account (1) and (4), we can turn the established inequalities into identities.

Corollary 6. Let m and p be positive integers, and let x = (x_{n})_{n>0} be a sequence of nonnegative integers so that x_{n+p} ≡ x_{n} (mod m) and R(m, p, x) − L(m, p, x) < 1. Then

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ = [F (m, p, n, x) − \frac{R(m, p, x) + L(m, p, x)}{2}] ,

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ = ⌊F (m, p, n, x) − L(m, p, x)⌋ ,

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ = ⌈F (m, p, n, x) − R(m, p, x)⌉ .

Corollary 7. Let m and p be positive integers, and let x = (x_{n})_{n>0} and y = (y_{n})_{n>0} be two sequences of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m), y_{n} = x_{n} + m − 1 and R(m, p, y) − L(m, p, y) < 1. Then

∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ = [F (m, p, n, y) − \frac{R(m, p, y) + L(m, p, y)}{2}] ,

∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ = ⌊F (m, p, n, y) − L(m, p, y)⌋ ,

∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ = ⌈F (m, p, n, y) − R(m, p, y)⌉ .

Corollary 8. Let m and p be positive integers, and let x = (x_{n})_{n>0} and z = (z_{n})_{n>0} be two sequences of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m), z_{n} = 2x_{n} + m and R(2m, p, z) − L(2m, p, z) < 1. Then

∑_{i=1}^{n} [\frac{x_{i}}{m}] = [F (2m, p, n, z) − \frac{R(2m, p, z) + L(2m, p, z)}{2}] ,

∑_{i=1}^{n} [\frac{x_{i}}{m}] = ⌊F (2m, p, n, z) − L(2m, p, z)⌋ ,

∑_{i=1}^{n} [\frac{x_{i}}{m}] = ⌈F (2m, p, n, z) − R(2m, p, z)⌉ .

Corollary 9. Let m and p be positive integers, and let x = (x_{n})_{n>0} be a sequence of nonnegative integers so that x_{n+p} ≡ x_{n} (mod m) and L(m, p, x), R(m, p, x) ∈ (−\frac{1}{2}, \frac{1}{2}). Then

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ = [F (m, p, n, x)] .

Corollary 10. Let m and p be positive integers, and let x = (x_{n})_{n>0} and y = (y_{n})_{n>0} be two sequences of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m), y_{n} = x_{n} + m − 1 and L(m, p, y), R(m, p, y) ∈ (−\frac{1}{2}, \frac{1}{2}). Then

∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ = [F (m, p, n, y)] .

Corollary 11. Let m and p be positive integers, and let x = (x_{n})_{n>0} and z = (z_{n})_{n>0} be two sequences of nonnegative integers, so that x_{n+p} ≡ x_{n} (mod m), z_{n} = 2x_{n} + m and L(2m, p, z), R(2m, p, z) ∈ (−\frac{1}{2}, \frac{1}{2}). Then

∑_{i=1}^{n} [\frac{x_{i}}{m}] = [F (2m, p, n, z)] .

We analyze now another property of sums with integer functions.

Corollary 12. Let m and p be positive integers. Let x = (x_{n})_{n>0} be a sequence of nonnegative integers such that x_{n+p} ≡ x_{n} (mod m) for all positive integers n. If f is any of these floor, ceiling or round functions, then

∑_{i=1}^{n} f (\frac{x_{i}}{m}) − ∑_{i=1}^{n−p} f (\frac{x_{i}}{m}) − ∑_{i=1}^{p} f (\frac{x_{i}}{m}) = \frac{1}{m} (∑_{i=1}^{n} x_{i} − ∑_{i=1}^{n−p} x_{i} − ∑_{i=1}^{p} x_{i}) .

Proof. Using the notations from proof of Theorem 1 and having the relation

G_{1}(m, p, n, x) = G_{1}(m, p, n − p, x)

we write

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ − ∑_{i=1}^{n−p} ⌊\frac{x_{i}}{m}⌋ = F (m, p, n, x) − F (m, p, n − p, x)

= \frac{1}{m} (∑_{i=1}^{n} x_{i} − ∑_{i=1}^{n−p} x_{i} − p · M(m, p, x)) .

Since

\frac{p}{m} · M(m, p, x) = \frac{1}{m} ∑_{i=1}^{p} x_{i} − ∑_{i=1}^{p} ⌊\frac{x_{i}}{m}⌋

it follows that

∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ − ∑_{i=1}^{n−p} ⌊\frac{x_{i}}{m}⌋ − ∑_{i=1}^{p} ⌊\frac{x_{i}}{m}⌋ = \frac{1}{m} (∑_{i=1}^{n} x_{i} − ∑_{i=1}^{n−p} x_{i} − ∑_{i=1}^{p} x_{i}) .

Similarly, we show that

∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ − ∑_{i=1}^{n−p} ⌈\frac{x_{i}}{m}⌉ − ∑_{i=1}^{p} ⌈\frac{x_{i}}{m}⌉ =

= \frac{1}{m} (∑_{i=1}^{n} (x_{i} + m − 1) − ∑_{i=1}^{n−p} (x_{i} + m − 1) − ∑_{i=1}^{p} (x_{i} + m − 1)) ,

∑_{i=1}^{n} [\frac{x_{i}}{m}] − ∑_{i=1}^{n−p} [\frac{x_{i}}{m}] − ∑_{i=1}^{p} [\frac{x_{i}}{m}] =

= \frac{1}{2m} (∑_{i=1}^{n} (2x_{i} + m) − ∑_{i=1}^{n−p} (2x_{i} + m) − ∑_{i=1}^{p} (2x_{i} + m)) .

Corollary 12 offers the possibility to describe the sum ∑_{i=1}^{n} f (\frac{x_{i}}{k} ) through linear recurrence relations. The effective determination of these recurrence relations depends on the sum ∑_{i=1}^{n} x_{i}. For precise m and p, the sum ∑_{i=1}^{p} f(\frac{x_{i}}{m}) is a constant that could be determined through numerical computation if we do not have formulas. For instance, if a_{n}, b_{n}, respectively, c_{n} denote the partial sums of the sequences (⌊\frac{x_{i}}{m}⌋)_{n>0}, (⌈\frac{x_{i}}{m}⌉)_{n>0}, respectively, ([\frac{x_{i}}{m}])_{n>0} i.e.,

a_{n} = ∑_{i=1}^{n} ⌊\frac{x_{i}}{m}⌋ , b_{n} = ∑_{i=1}^{n} ⌈\frac{x_{i}}{m}⌉ , c_{n} = ∑_{i=1}^{n} [\frac{x_{i}}{m}]

then, according to Corollary 12 we get the following recurrence relations:

a_{n} = a_{n−p} + \frac{1}{m} (∑_{i=1}^{n} x_{i} − ∑_{i=1}^{n−p} x_{i}) − \frac{p}{m} · M(m, p, x) ,

b_{n} = b_{n−p} + \frac{1}{m} (∑_{i=1}^{n} y_{i} − ∑_{i=1}^{n−p} y_{i}) − \frac{p}{m} · M(m, p, y) ,

c_{n} = c_{n−p} + \frac{1}{2m} (∑_{i=1}^{n} z_{i} − ∑_{i=1}^{n−p} z_{i}) − \frac{p}{2m} · M(2m, p, z) ,

where y = (y_{n})_{n>0} = (x_{n} + m − 1)_{n>0}, z = (z_{n})_{n>0} = (2x_{n} + m)_{n>0}.

We can determine the constants M(m, p, x), L(m, p, x) and R(m, p, x) using computer algebra system.

3 Applications to positive integer sequences

We can apply Theorem 1 to any periodic sequence modulo m. There are a lot of sequences having this property. Here we have just presented several of them as applications.

3.1 Power sums

Let k be a positive integer. Faulhaber’s formula [6], named after Johann Faulhaber, expresses the sum

∑_{i=1}^{n} i^{k} = 1^{k} + 2^{k} + 3^{k} + ⋯ + n^{k}

as a (k + 1)th-degree polynomial function of n, the coefficients involving Bernoulli numbers, written B_{i}. The formula says

∑_{i=1}^{n} i^{k} = ∑_{i=1}^{k+1} b_{k,i} n^{i} .  (10)

where

b_{k,i} = \frac{(−1)^{k+1−i} B_{k+1−i}}{k + 1} \binom{k + 1}{i} .

For any integer m, m > 1, the sequence (x_{n})_{n>0}, x_{n} = n^{k} (k ∈ ℕ), has the property x_{n+m} ≡ x_{n} (mod m). If f is any of these floor, ceiling or round functions, then by Corollary 12 and formula (10), we get the following recurrence relation:

∑_{i=1}^{n} f (\frac{i^{k}}{m}) − ∑_{i=1}^{n−m} f (\frac{i^{k}}{m}) − ∑_{i=1}^{m} f (\frac{i^{k}}{m}) − \frac{1}{m} ∑_{i=2}^{k+1} b_{k,i} (n^{i} − (n − m)^{i} − m^{i}) = 0 . (11)

Example 1. Since k = 2, it follows that

b_{2,2} = \frac{(−1)^{2+1−2}B_{2+1−2}}{2 + 1} \binom{2 + 1}{2} = −B_{1} = \frac{1}{2} ,
b_{2,3} = \frac{(−1)^{2+1−3}B_{2+1−3}}{2 + 1} \binom{2 + 1}{3} = \frac{B_{0}}{3} = \frac{1}{3} .

Having

∑_{i=2}^{3} b_{2,i} (n^{i} − (n − m)^{i} − m^{i}) = \frac{1}{2} (n^{2} − (n − m)^{2} − m^{2}) + \frac{1}{3} (n^{3} − (n − m)^{3} − m^{3})
= nm − m^{2} + n^{2}m − nm^{2} = m(n − m) + nm(n − m)
= m(n + 1)(n − m)

from (11), we get the following relation

a_{n} − a_{n−m} − a_{m} − (n + 1)(n − m) = 0 .  (12)

That could be turned into linear homogeneous recurrence:

a_{n} − 3a_{n−1} + 3a_{n−2} − a_{n−3} − a_{n−m} + 3a_{n−m−1} − 3a_{n−m−2} + a_{n−m−3} = 0  (13)

where, a_{n} = ∑_{i=1}^{n} f (\frac{i^{2}}{m}) and f is any of these floor, ceiling or round functions.

For any integer m, m > 1, the sequence x^{(f,k,m)} = (x_{n}^{(f,k,m)})_{n>0},

x_{n}^{(f,k,m)} = \begin{cases}n^{k}, & if f is the floor function, \\ n^{k} + m − 1, & if f is the ceiling function, \\ 2n^{k} + m, & if f is the round function \end{cases}

has the property

x_{n+m}^{(f,k,m)} ≡ \begin{cases}x_{n}^{(f,k,m)} (mod m), & if f is the floor or the ceiling function, \\ x_{n}^{(f,k,m)} (mod 2m), & if f is the round function. \end{cases}

We denote

M_{f}(m, n, k) = \begin{cases}M (m, n, x^{(f,k,m)}) , & if f is the floor or the ceiling function, \\ M (2m, n, x^{(f,k,m)}) , & if f is the round function, \end{cases}  (14)

F_{f}(m, n, k) = \begin{cases}F (m, m, n, x^{(f,k,m)}) , & if f is the floor or the ceiling function, \\ F (2m, m, n, x^{(f,k,m)}) , & if f is the round function, \end{cases} (15)

G_{f}(m, n, k) = \begin{cases}G (m, m, n, x^{(f,k,m)}) , & if f is the floor or the ceiling function, \\ G (2m, m, n, x^{(f,k,m)}) , & if f is the round function, \end{cases}

L_{f}(m, k) = \begin{cases}L (m, m, x^{(f,k,m)}) , & if f is the floor or the ceiling function, \\ L (2m, m, x^{(f,k,m)}) , & if f is the round function, \end{cases}

R_{f}(m, k) = \begin{cases}R (m, m, x^{(f,k,m)}) , & if f is the floor or the ceiling function, \\ R (2m, m, x^{(f,k,m)}) , & if f is the round function, \end{cases}

b_{k,1}^{(f,m)} = b_{k,1} + \begin{cases}−M_{f}(m, m, k), & if f is the floor function, \\ m − 1 − M_{f}(m, m, k), & if f is the ceiling function, \\ \frac{1}{2} (m − M_{f}(m, m, k)) , & if f is the round function, \end{cases}  (16)

b_{k,i}^{(f,m)} = b_{k,i} , i > 1 .

According to (10), (14), (15) and (16), we obtain:

F_{f}(m, n, k) = \frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} .

The theorems from Section 2 lead to the inequality

L_{f}(m, k) ≤ \frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} − ∑_{i=1}^{n} f (\frac{i^{k}}{m}) ≤ R_{f}(m, k)

and we deduce

|\frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} − \frac{R_{f}(m, k) + L_{f}(m, k)}{2} − ∑_{i=1}^{n} f (\frac{i^{k}}{m})| ≤ \frac{R_{f}(m, k) − L_{f}(m, k)}{2} , (17)

⌈\frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} − R_{f}(m, k)⌉ ≤ ∑_{i=1}^{n} f (\frac{i^{k}}{m}) ≤ ⌊\frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} − L_{f}(m, k)⌋ .

If R_{f}(m, k) − L_{f}(m, k) < 1, then we apply Corollary 6, Corollary 7 and Corollary 8 to establish such identities as

∑_{i=1}^{n} f (\frac{i^{k}}{m}) = [\frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} − \frac{R_{f}(m, k) − L_{f}(m, k)}{2}]  (18)

= ⌊\frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} − L_{f}(m, k)⌋  (19)

= ⌈\frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i} − R_{f}(m, k)⌉ .  (20)

For R_{f}(m, k), L_{f}(m, k) ∈ (−\frac{1}{2}, \frac{1}{2}) we apply Corollary 9, Corollary 10 and Corollary 11 to get a simpler form of the identity (18)

∑_{i=1}^{n} f (\frac{i^{k}}{m}) = [\frac{1}{m} ∑_{i=1}^{k+1} b_{k,i}^{(f,m)}n^{i}] .  (21)

Using Maple to determine the values M_{f}(m, k), L_{f}(m, k), R_{f}(m, k) and b_{k,i}^{(f,m)}, we can generate many inequalities and identities.

For k = 2, in Table 1 we present only those values of m that allow us to apply Corollary 8, i.e., R_{f}(m, 2) − L_{f}(m, 2) < 1. Note that for all the values of m from Table 1, Corollary 11 can be also applied, i.e., R_{f}(m, 2), L_{f}(m, 2) ∈ (−\frac{1}{2}, \frac{1}{2}), when f is the round function.

Table 1: The values of m, M, L and R for (18), (19), (20), (21) when k = 2 and f = [ ]

m  L  R  M  OEIS  m  L  R  M  OEIS
2 −1/4  0  1 \underline{A131941}  13 −5/13 5/13 13 \underline{A177176}
3  0  2/9 13/3 \underline{A181286}  16 −13/32 3/8  15 \underline{A177189}
4  0  1/8  5 \underline{A173196}  17 −6/17 6/17 17 \underline{A177205}
5 −1/5 1/5  5 \underline{A173690}  19 −7/19 9/19 23 \underline{A177237}
6 −4/9 11/36 13/3 \underline{A173691}  20 −1/5 13/40 25 \underline{A177239}
7 −2/7 2/7 7 \underline{A173721} 28 −3/7 25/56 29 \underline{A177277}
8 −1/3 3/16 7 \underline{A173722}  29 −14/29 14/29 29 \underline{A177332}
9 −1/3 11/27 31/3 \underline{A177100}  36 −85/216 13/27 127/3 \underline{A177337}
11 −3/11 5/11 15 \underline{A177166}  44 −35/88 5/11 49 \underline{A177339}
12 −1/8 2/9 43/3 \underline{A181120}

Example 2. When f is the round function, k = 2 and m = 5, using Maple, we get the following:

M = 5 , L = −\frac{1}{5} and R = \frac{1}{5} .

We have

b_{2,1}^{(f,5)} = (−1)^{2}B_{2} + \frac{5 − M}{2} = \frac{1}{6} + \frac{5 − 5}{6} = \frac{1}{6} .

The values of b_{2,2} and b_{2,3} are those calculated in Example 1. By (17), we get the inequality

|\frac{1}{15}n^{3} + \frac{1}{10}n^{2} + \frac{1}{30}n − ∑_{i=1}^{n} [\frac{i^{2}}{5} ]| ≤ \frac{1}{5} ,

and by (18), (19), (20) and (21) we get the identities

a_{n} = ∑_{i=1}^{n} [\frac{i^{2}}{5} ] = [\frac{1}{15}n^{3} + \frac{1}{10}n^{2} + \frac{1}{30}n] = [\frac{n(n + 1)(2n + 1)}{30}]  (22)

= ⌊\frac{1}{15}n^{3} + \frac{1}{10}n^{2} + \frac{1}{30}n + \frac{1}{5}⌋
= ⌈\frac{1}{15}n^{3} + \frac{1}{10}n^{2} + \frac{1}{30}n − \frac{1}{5}⌉ .

By (12), we obtain the relation

a_{n} − a_{n−5} − (n + 1)(n − 5) − 11 = 0 ,

and by (13) we get the following linear homogeneous recurrence

a_{n} − 3a_{n−1} + 3a_{n−2} − a_{n−3} − a_{n−5} + 3a_{n−6} − 3a_{n−7} + a_{n−8} = 0 , n > 7 ,

where a_{0} = 0, a_{1} = 0, a_{2} = 1, a_{3} = 3, a_{4} = 6, a_{5} = 11, a_{6} = 18 and a_{7} = 28.

By (22), we deduce an interesting identity

∑_{i=1}^{n} [\frac{i^{2}}{5} ] = [\frac{1}{5} ∑_{i=1}^{n} i^{2}] .

Analyzing (16), (18) and (21), we note that an identity such as

∑_{i=1}^{n} [\frac{i^{k}}{m}] = [\frac{1}{m} ∑_{i=1}^{n} i^{k}] , m > 1 ,  (23)

is true when

M_{f}(m, m, k) = m and R_{f}(m, k), L_{f}(m, k) ∈ (−\frac{1}{2}, \frac{1}{2}) ,  (24)

where f is the round function. This observation allows us to use Maple to establish many identities such as (23). In Table 2 we present values of m and k for which identity (23) is true.

Some values presented in Table 2 make us ask a few questions. For instance, is the identity

∑_{i=1}^{n} [\frac{i^{2k+1}}{3} ] = [\frac{1}{3} ∑_{i=1}^{n} i^{2k+1}]  (25)

Table 2: The values of k and m for identities (23)

k m  k m
1 3  21 3, 4, 7, 9, 36, 43, 49, 81, 196, 441
2 5, 7, 13, 17, 29  22 5, 7, 13, 17, 49, 121, 343
3 3, 4, 5, 7, 9, 11, 36, 52, 117  23 3, 4, 5, 11, 16, 47
4 7, 17, 49  24 17, 31, 73
5 3, 4, 11, 25  25 3, 4, 11, 25, 101, 125, 500
6 5, 13, 17  26 5, 7, 13, 29, 53, 157, 169
7 3, 4, 5, 11, 13, 16  27 3, 4, 5, 7, 9, 11, 16, 19, 27, 36,
8 7, 17, 31  37, 52, 81, 117, 171, 189, 324
9 3, 4, 7, 9, 11, 19, 27, 36, 171, 189  28 7, 43, 49, 113, 343
10 5, 7, 13, 25, 31, 49, 325  29 3, 4, 11, 17, 59
11 3, 4, 5, 16, 23, 25, 37, 121  30 5, 13, 25, 29, 61, 325
12  31 3, 4, 5, 13, 16, 25
13 3, 4, 11, 17  32 7
14 5, 7, 13, 29, 43, 49  33 3, 4, 7, 9, 11, 23, 36, 67, 81, 121
15 3, 4, 5, 7, 9, 11, 16, 25, 31, 36,  34 5, 7, 13, 17, 49, 289
52, 117  35 3, 4, 5, 11, 16, 25, 27, 71, 125
16 7, 23, 49  36 17, 53, 73
17 3, 4, 11, 27  37 3, 4, 11
18 5, 7, 13, 23, 37  38 5, 7, 13, 17, 23, 31
19 3, 4, 5, 11, 13, 16  39 3, 4, 5, 7, 9, 11, 16, 36, 52, 79, 117
20 7, 17, 31, 41  40 7, 17, 23, 31, 49

true for any nonnegative integer k? The answer to this question is affirmative as we will prove. For this, it is sufficient to show that for any nonnegative integer k and for m = 3, condition (24) is fulfilled. As 2 · 2^{2k+1} ≡ 4 (mod 6) and 2 · 3^{2k+1} ≡ 0 (mod 6), for any nonnegative integer k, we write

M_{f}(3, 3, 2k + 1) = \frac{1}{3} (5 + 1 + 3) = 3 ,
G_{f}(3, 1, 2k + 1) = \frac{1}{6} (5 − 3) = \frac{1}{3} ,
G_{f}(3, 2, 2k + 1) = \frac{1}{6} (5 + 1 − 2 · 3) = 0 ,
G_{f}(3, 3, 2k + 1) = \frac{1}{6} (5 + 1 + 3 − 3 · 3) = 0 ,

where f is the round function. Thus, identity (25) is true.

Similarly, we can prove the following identities

∑_{i=1}^{n} [\frac{i^{k}}{4} ] = [\frac{1}{4} ∑_{i=1}^{n} i^{k}] , k ≡ 1 (mod 2) , k > 1 ,

∑_{i=1}^{n} [\frac{i^{k}}{5} ] = [\frac{1}{5} ∑_{i=1}^{n} i^{k}] , k ≡ 2, 3 (mod 4) ,

∑_{i=1}^{n} [\frac{i^{k}}{7} ] = [\frac{1}{7} ∑_{i=1}^{n} i^{k}] , k ≡ 2, 3, 4 (mod 6) ,

∑_{i=1}^{n} [\frac{i^{k}}{9} ] = [\frac{1}{9} ∑_{i=1}^{n} i^{k}] , k ≡ 3 (mod 6) ,

∑_{i=1}^{n} [\frac{i^{k}}{11}] = [\frac{1}{11} ∑_{i=1}^{n} i^{k}] , k ≡ 3, 5, 7, 9 (mod 10) ,

∑_{i=1}^{n} [\frac{i^{k}}{13}] = [\frac{1}{13} ∑_{i=1}^{n} i^{k}] , k ≡ 2 (mod 4) ,

∑_{i=1}^{n} [\frac{i^{k}}{16}] = [\frac{1}{16} ∑_{i=1}^{n} i^{k}] , k ≡ 3 (mod 4) , k > 3 ,

∑_{i=1}^{n} [\frac{i^{k}}{17}] = [\frac{1}{17} ∑_{i=1}^{n} i^{k}] , k ≡ 2, 4, 6, 8, 13, 20, 22, 24, 29 (mod 32) ,

∑_{i=1}^{n} [\frac{i^{k}}{19}] = [\frac{1}{19} ∑_{i=1}^{n} i^{k}] , k ≡ 9 (mod 18) ,

∑_{i=1}^{n} [\frac{i^{k}}{23}] = [\frac{1}{23} ∑_{i=1}^{n} i^{k}] , k ≡ 11, 16, 18 (mod 22) ,

∑_{i=1}^{n} [\frac{i^{k}}{25}] = [\frac{1}{25} ∑_{i=1}^{n} i^{k}] , k ≡ 5, 10, 11, 15 (mod 20) .

There is another question that rises from Table 2: is there any integer m, m > 1, for k = 12 so that the identity (23) is true?

By (16) and (19) we deduce that an identity such as

∑_{i=1}^{n} [\frac{i^{k}}{m}] = ⌊\frac{1}{m} ∑_{i=1}^{n} i^{k}⌋ , m > 1 ,  (26)

is true when

M_{f}(m, m, k) = m ,  L_{f}(m, k) = 0 and R_{f}(m, k) < 1 ,  (27)

where f is the round function. In Table 3 we present values of m and k for which the identity (26) is true. For even values of k, I did not find any m so that condition (27) should be fulfilled. Is identity (26) false for any even value of k?

Table 3: The values of k and m for identities (26)

\begin{matrix}k & m & k & m \\ 1 & 3, 5, 7 & 27 & 3, 4, 7, 8, 9, 17, 27, 81, 243 \\ 3 & 3, 4, 7, 8, 9, 27 & 29 & 3, 4, 5, 8, 13, 25, 59 \\ 5 & 3, 4, 5, 8, 11, 13, 25 & 31 & 3, 4, 7, 8, 9 \\ 7 & 3, 4, 7, 8, 9 & 33 & 3, 4, 5, 7, 8, 9, 23 \\ 9 & 3, 4, 5, 7, 8, 9, 25, 27, 81 & 35 & 3, 4, 8, 11, 43, 49, 71 \\ 11 & 3, 4, 8, 17, 23 & 37 & 3, 4, 5, 7, 8, 9 \\ 13 & 3, 4, 5, 7, 8, 9, 169 & 39 & 3, 4, 7, 8, 9, 27, 79 \\ 15 & 3, 4, 7, 8, 9, 11, 31 & 41 & 3, 4, 5, 8, 13, 83 \\ 17 & 3, 4, 5, 8, 13 & 43 & 3, 4, 7, 8, 9, 17 \\ 19 & 3, 4, 7, 8, 9 & 45 & 3, 4, 5, 7, 8, 9, 11, 25, 27, 31 \\ 21 & 3, 4, 5, 7, 8, 9, 27, 49 & 47 & 3, 4, 8 \\ 23 & 3, 4, 8, 47 & 49 & 3, 4, 5, 7, 8, 9, 25 \\ 25 & 3, 4, 5, 7, 8, 9, 11, 25, 31, 125 & 51 & 3, 4, 7, 8, 9, 103 \end{matrix}

Considering the demonstration of identity (25), we deduce the following identity

∑_{i=1}^{n} [\frac{i^{2k+1}}{3} ] = ⌊\frac{1}{3} ∑_{i=1}^{n} i^{2k+1}⌋ , k ≥ 0 .

For k > 0 we have 2 · 2^{2k+1} ≡ 0 (mod 8), 2 · 3^{2k+1} ≡ 6 (mod 8) and 2 · 4^{2k+1} ≡ 0 (mod 8). We can write

M_{f}(4, 4, 2k + 1) = \frac{1}{4} (6 + 4 + 2 + 4) = 4 ,
G_{f}(4, 1, 2k + 1) = \frac{1}{8} (6 − 4) = \frac{1}{4} ,
G_{f}(4, 2, 2k + 1) = \frac{1}{8} (6 + 4 − 2 · 4) = \frac{1}{4} ,
G_{f}(4, 3, 2k + 1) = \frac{1}{8} (6 + 4 + 2 − 3 · 4) = 0 ,
G_{f}(4, 4, 2k + 1) = \frac{1}{8} (6 + 4 + 2 + 4 − 4 · 4) = 0 ,

where f is the round function. Condition (27) being fulfilled, we get the identity

∑_{i=1}^{n} [\frac{i^{2k+1}}{4} ] = ⌊\frac{1}{4} ∑_{i=1}^{n} i^{2k+1}⌋ , k > 0 .

Similarly, we get the following identities:

∑_{i=1}^{n} [\frac{i^{k}}{5} ] = ⌊\frac{1}{5} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 1 (mod 4) ,

∑_{i=1}^{n} [\frac{i^{k}}{7} ] = ⌊\frac{1}{7} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 1, 3 (mod 6) ,

∑_{i=1}^{n} [\frac{i^{k}}{8} ] = ⌊\frac{1}{8} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 1 (mod 2) , k > 1 ,

∑_{i=1}^{n} [\frac{i^{k}}{9} ] = ⌊\frac{1}{9} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 1, 3 (mod 6) , k > 1 ,

∑_{i=1}^{n} [\frac{i^{k}}{11}] = ⌊\frac{1}{11} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 5 (mod 10) ,

∑_{i=1}^{n} [\frac{i^{k}}{13}] = ⌊\frac{1}{13} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 5 (mod 12) ,

∑_{i=1}^{n} [\frac{i^{k}}{17}] = ⌊\frac{1}{17} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 11 (mod 16) ,

∑_{i=1}^{n} [\frac{i^{k}}{23}] = ⌊\frac{1}{23} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 11 (mod 22) ,

∑_{i=1}^{n} [\frac{i^{k}}{25}] = ⌊\frac{1}{25} ∑_{i=1}^{n} i^{k}⌋ , k ≡ 5, 9 (mod 20) .

By (16) and (20) we deduce that an identity as

∑_{i=1}^{n} [\frac{i^{k}}{m}] = ⌈\frac{1}{m} ∑_{i=1}^{n} i^{k}⌉ , m > 1 ,  (28)

is true if

M_{f}(m, m, k) = m ,  R_{f}(m, k) = 0 and L_{f}(m, k) > −1 .  (29)

Using Maple, we find values for m and k so that condition (29) is fulfilled. This time we do not find anything. Is identity (28) false for any positive integer k and any integer m, m > 1?

Example 3. Solution to Problem 1. When f is the floor function, k = 2 and m = 12, using Maple, we get the following:

M = \frac{19}{6} , L = −\frac{13}{72} and R = \frac{4}{9} .

We have

b_{2,1}^{(f,12)} = (−1)^{2}B_{2} − M = \frac{1}{6} − \frac{19}{6} = −3 .

The values of b_{2,2} and b_{2,3} are those calculated in Example 1. By (21) we obtain

S_{1}(n) = ∑_{i=1}^{n} ⌊\frac{i^{2}}{12}⌋ = [\frac{1}{36}n^{3} + \frac{1}{24}n^{2} − \frac{1}{4}n] .

When f is the round function, k = 2 and m = 12, we get the following:

M = \frac{43}{3} , L = −\frac{1}{8} and R = \frac{2}{9} .

We have

b_{2,1}^{(f,12)} = (−1)^{2}B_{2} + \frac{12 − M}{2} = \frac{1}{6} − \frac{7}{6} = −1 ,

By (21) we obtain

S_{2}(n) = ∑_{i=1}^{n} [\frac{i^{2}}{12}] = [\frac{1}{36}n^{3} + \frac{1}{24}n^{2} − \frac{1}{12}n] ,

and the problem is solved.

3.2 Positive integers powers

For every positive integer m and every integer a relatively prime to m, we denote by ord_{m}(a) the multiplicative order of a modulo m, i.e., the smallest positive integer n such that a^{n} ≡ 1 (mod m), namely

ord_{m}(a) = min {n ∈ ℕ^{∗} | a^{n} ≡ 1 (mod m)}

Note that ord_{m}(a) divides φ(m), φ being the Euler’s totient function. If ord_{m}(a) = φ(m) then a is called a primitive root modulo m. If m is a prime, then φ(m) = m − 1.

For every positive integer m, m > 1, and every integer k relatively prime to m, k > 1, the sequence (x_{n})_{n>0}, x_{n} = k^{n}, has the property x_{n+ord_{m}(k)} ≡ x_{n} (mod m). The relation

∑_{i=1}^{n} k^{i} = \frac{k^{n+1} − k}{k − 1}  (30)

and Corollary 12 allow us to obtain the following linear homogeneous recurrence:

a_{n} − (k + 1)a_{n−1} + ka_{n−2} − a_{n−ord_{m}(k)} + (k + 1)a_{n−ord_{m}(k)−1} − ka_{n−ord_{m}(k)−2} = 0 ,

where a_{n} = ∑_{i=1}^{n} f (\frac{k^{i}}{m}) and f is any of these floor, ceiling or round functions. If m is a prime and k is a primitive root modulo m, then we have

a_{n} − (k + 1)a_{n−1} + ka_{n−2} − a_{n−m+1} + (k + 1)a_{n−m} − ka_{n−m−1} = 0 .

For every positive integer m, m > 1, and every integer k relatively prime to m, k > 1, the sequence x^{(f,k,m)} = (x_{n}^{(f,k,m)})_{n>0},

x_{n}^{(f,k,m)} = \begin{cases}k^{n}, & if f is the floor function, \\ 2k^{n} + m, & if f is the round function, \end{cases}

has the property

x_{n+ord_{m}(k)}^{(f,k,m)} ≡ \begin{cases}x_{n}^{(f,k,m)} (mod m), & if f is the floor function, \\ x_{n}^{(f,k,m)} (mod 2m), & if f is the round function. \end{cases}

As m and k are relatively primes, it follows that

⌈\frac{k^{n}}{m} ⌉ = ⌊\frac{k^{n}}{m} ⌋ + 1 ,

which enables us to write

∑_{i=1}^{n} ⌈\frac{k^{i}}{m}⌉ = n + ∑_{i=1}^{n} ⌊\frac{k^{i}}{m}⌋

and then to note that it is enough to investigate only those sums which involve the floor or the round function.

We denote

M_{f}(m, k) = \begin{cases}M (m, ord_{m}(k), x^{(f,k,m)}) , & if f is the floor function, \\ M (2m, ord_{m}(k), x^{(f,k,m)}) , & if f is the round function, \end{cases}  (31)

F_{f}(m, n, k) = \begin{cases}F (m, ord_{m}(k), n, x^{(f,k,m)}) , & if f is the floor function, \\ F (2m, ord_{m}(k), n, x^{(f,k,m)}) , & if f is the round function, \end{cases}  (32)

L_{f}(m, k) = \begin{cases}L (m, ord_{m}(k), x^{(f,k,m)}) , & if f is the floor function, \\ L (2m, ord_{m}(k), x^{(f,k,m)}) , & if f is the round function, \end{cases}

R_{f}(m, k) = \begin{cases}R (m, ord_{m}(k), x^{(f,k,m)}) , & if f is the floor function, \\ R (2m, ord_{m}(k), x^{(f,k,m)}) , & if f is the round function. \end{cases}

According to (30), (31) and (32) we obtain:

F_{f}(m, n, k) = \frac{k^{n+1} − k}{m(k − 1)} + \frac{n}{m} · \begin{cases}−M_{f}(m, k), & if f is the floor function, \\ \frac{1}{2} (m − M_{f}(m, k)) , & if f is the round function. \end{cases}

If a is a positive integer so that a ≡ k (mod m), then ord_{m}(a) = ord_{m}(k). Thus, for a ≡ k (mod m), we deduce that

M_{f}(m, a) = M_{f}(m, k) , L_{f}(m, a) = L_{f}(m, k) and R_{f}(m, a) = R_{f}(m, k) ,  (33)

where f is the floor or the round function.

Example 4. If k ≡ 1 (mod m), i.e., ord_{m}(k) = 1, then it is clear that:

M_{f}(m, k) = 1 and L_{f}(m, k) = R_{f}(m, k) = 0 ,

where f is the floor function. According to Theorem 1 we get the following identity

∑_{i=1}^{n} ⌊\frac{k^{i}}{m}⌋ = \frac{k^{n+1} − (n + 1)k + n}{m(k − 1)} , k ≡ 1 (mod m) , k > 1 ,  (34)

that can be rewritten in this way:

∑_{i=1}^{n} ⌊\frac{(km + 1)^{i}}{m} ⌋ = \frac{(km + 1)^{n+1} − (n + 1)km − 1}{m^{2}k} , k > 0 .

For instance, by (34), for m = 5 and k = 6 we get:

∑_{i=1}^{n} ⌊\frac{6^{i}}{5} ⌋ = \frac{6^{n+1} − 5n − 6}{25} .

Example 5. If m is a prime and k is a primitive root modulo m, then we have

M_{f}(m, k) = \frac{1}{m − 1} ∑_{i=1}^{m−1} i = \frac{m}{2} ,

where f is the floor function. According to Corollary 9, we get the following identity

∑_{i=1}^{n} ⌊\frac{k^{i}}{m}⌋ = [\frac{k^{n+1} − k}{m(k − 1)} − \frac{n}{2}] .

Example 6. If k is an odd number, then we get

ord_{2}(k) = 1 , (2k + 2) mod 4 = 0 , M_{f}(2, k) = 0 and L_{f}(2, k) = R_{f}(2, k) = 0 , where f is the round function. By Theorem 1, we get the identity

∑_{i=1}^{n} [\frac{k^{i}}{2} ] = \frac{k}{2} · \frac{k^{n} − 1}{k − 1} + \frac{n}{2} , k ≡ 1 (mod 2) , k > 1 .

Example 7. If m > 2 and k ≡ 1 (mod m), then we get

M_{f}(m, k) = (2k + m) mod 2m = m + 2 and L_{f}(m, k) = R_{f}(m, k) = 0 , where f is the round function. By Theorem 1, we get the identity

∑_{i=1}^{n} [\frac{k^{i}}{m}] = \frac{k^{n+1} − (n + 1)k + n}{m(k − 1)} , k ≡ 1 (mod m) , k > 1 , m > 2.  (35)

From (34) and (35), we deduce the identity

∑_{i=1}^{n} [\frac{k^{i}}{m}] = ∑_{i=1}^{n} ⌊\frac{k^{i}}{m}⌋ , k ≡ 1 (mod m) , k > 1 , m > 2.

Example 8. If k = m − 1 then k^{2} ≡ 1 (mod m), i.e., ord_{m}(k) = 2. Moreover, we have

(2(m − 1) + m) mod 2m = m − 2 and (2(m − 1)^{2} + m) mod 2m = m + 2 .

Thus we deduce that

M_{f}(m, m − 1) = m , L_{f}(m, m − 1) = −\frac{1}{m} , R_{f}(m, m − 1) = 0 ,

where f is the round function. Now, according to (33), the following inequalities are direct consequences of the Theorem 3

−\frac{1}{m} ≤ \frac{k^{n+1} − k}{m(k − 1)} − ∑_{i=1}^{n} [\frac{k^{i}}{m}] ≤ 0 , k ≡ −1 (mod m) ,

|\frac{k^{n+1} − k}{m(k − 1)} + \frac{1}{2m} − ∑_{i=1}^{n} [\frac{k^{i}}{m}]| ≤ \frac{1}{2m} , k ≡ −1 (mod m) ,

and by Corollary 8 and Corollary 11, we get the identities

∑_{i=1}^{n} [\frac{k^{i}}{m}] = [\frac{k^{n+1} − k}{m(k − 1)} + \frac{1}{2m}] = [\frac{1}{m} (\frac{1}{2} + ∑_{i=1}^{n} k^{i})]

= ⌊\frac{k^{n+1} − k}{m(k − 1)} + \frac{1}{m}⌋ = ⌊\frac{1}{m} (1 + ∑_{i=1}^{n} k^{i})⌋

= ⌈\frac{k^{n+1} − k}{m(k − 1)}⌉ = ⌈\frac{1}{m} ∑_{i=1}^{n} k^{i}⌉

= [\frac{k^{n+1} − k}{m(k − 1)}] = [\frac{1}{m} ∑_{i=1}^{n} k^{i}] , k ≡ −1 (mod m) .

Using Maple to determine the values ord_{m}(k), L_{f}(m, k) and R_{f}(m, k) we can generate many inequalities, but also few identities.

Example 9. The integers m = 7 and k = 2 are relatively primes, but 2 is not a primitive root modulo 7, i.e., φ(7) = 6 and ord_{7}(2) = 3. When f is the floor function we get

M = \frac{7}{3} , L = −\frac{1}{21} and R = \frac{4}{21} .

By Theorem 1 and Corollary 4, we get the inequalities

−\frac{1}{21} ≤ \frac{2^{n+1}}{7} − \frac{n}{3} − \frac{2}{7} − ∑_{i=1}^{n} ⌊\frac{2^{i}}{7} ⌋ ≤ \frac{4}{21} ,

|\frac{2^{n+1}}{7} − \frac{n}{3} − \frac{5}{14} − ∑_{i=1}^{n} ⌊\frac{2^{i}}{7} ⌋| ≤ \frac{5}{42} ,

and by Corrollary 6 and Corollary 9 we get the identities

∑_{i=1}^{n} ⌊\frac{2^{i}}{7} ⌋ = [\frac{2^{n+1}}{7} − \frac{n}{3} − \frac{5}{14}] = ⌊\frac{2^{n+1}}{7} − \frac{n}{3} − \frac{5}{21}⌋

= ⌈\frac{2^{n+1}}{7} − \frac{n}{3} − \frac{10}{21}⌉ = [\frac{2^{n+1}}{7} − \frac{n}{3} − \frac{2}{7}] .

3.3 Fibonacci numbers

By definition, the first two Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous two (sequence \underline{A000045} in [10]). In mathematical terms, the sequence (F_{n})_{n≥0} of Fibonacci numbers is defined by the recurrence relation

F_{n} = F_{n−1} + F_{n−2}

with seed values

F_{0} = 0 and F_{1} = 1 .

One way to discover some fascinating properties of the Fibonacci sequence is to consider the sequence of least nonnegative residues of the Fibonacci numbers under some modulus. One of the first modern inquiries into this area of research was made by D. D. Wall [11] in 1960, though J. L. Lagrange [4] made some observations on these types of sequences in the eighteenth century. So, we know that F ( mod m) is periodic, and the period is known as the Pisano period π(m) (see [4] and sequence \underline{A001175} in [10]).

On the other hand, there are known a lot of identities that involve sums with Fibonacci numbers. Together with Theorem 1, these allow the establishing of numerous inequalities, but also few identities with sums that imply integer functions and Fibonacci numbers. The following applications base on the identity

∑_{i=1}^{n} F_{i} = F_{n+2} − 1 ,  (36)

which, corroborated with Corollary 12, allows us to get the relation

∑_{i=1}^{n} f (\frac{F_{i}}{m} ) − ∑_{i=1}^{n−π(m)} f (\frac{F_{i}}{m} ) − ∑_{i=1}^{π(m)} f (\frac{F_{i}}{m} ) = \frac{1}{m} (F_{n+2} − F_{n+2−π(m)} − F_{π(m)+2} + 1) ,

where f is any of these floor, ceiling or round functions.

For every positive integer m the sequence x^{(f,m)} = (x_{n}^{(f,m)})_{n>0},

x_{n}^{(f,m)} = \begin{cases}F_{n}, & if f is the floor function, \\ F_{n} + m − 1, & if f is the ceiling function, \\ 2F_{n} + m, & if f is the round function \end{cases}

x_{n+π(m)}^{(f,m)} ≡ \begin{cases}x_{n}^{(f,m)} (mod m), & if f is the floor or the ceiling function, \\ x_{n}^{(f,m)} (mod 2m), & if f is the round function. \end{cases}

We denote

M_{f}(m) = \begin{cases}M (m, π(m), x^{(f,m)}) , & if f is the floor or the ceiling function, \\ M (2m, π(m), x^{(f,m)}) , & if f is the round function, \end{cases} (37)

F_{f}(m, n) = \begin{cases}F (m, π(m), n, x^{(f,m)}) , & if f is the floor or the ceiling function, \\ F (2m, π(m), n, x^{(f,m)}) , & if f is the round function, \end{cases}  (38)

L_{f}(m) = \begin{cases}L (m, π(m), x^{(f,m)}) , & if f is the floor or the ceiling function, \\ L (2m, π(m), x^{(f,m)}) , & if f is the round function, \end{cases}

R_{f}(m) = \begin{cases}R (m, π(m), x^{(f,m)}) , & if f is the floor or the ceiling function, \\ R (2m, π(m), x^{(f,m)}) , & if f is the round function. \end{cases}

According to (36), (37) and (38) we obtain:

F_{f}(m, n) = \frac{F_{n+2} − 1}{m} + \frac{n}{m} · \begin{cases}−M_{f}(m), & if f is the floor function, \\ m − 1 − M_{f}(m), & if f is the ceiling function, \\ \frac{1}{2} (m − M_{f}(m)) , & if f is the round function. \end{cases}

In order to generate identities, we use Maple to find values for m so that R_{f}(m)−L_{f}(m) < 1. We find these values:

m ∈ \begin{cases}\{2, 3, 4\} , & if f is the floor function, \\ \{2, 3, 4, 11\} , & if f is the ceiling function, \\ \{2, 4, 11\} , & if f is the round function. \end{cases}

Example 10. Taking into account that π(4) = 6, when f is the round function, we get

M = 4 , L = −\frac{1}{4} and R = \frac{1}{2} .

By Theorem 3, we get the inequality

−\frac{1}{4} ≤ \frac{F_{n+2} − 1}{4} − ∑_{i=1}^{n} [\frac{F_{i}}{4} ] ≤ \frac{1}{2} ,

that can be rewritten in the following way

|\frac{F_{n+2}}{4} − \frac{3}{8} − ∑_{i=1}^{n} [\frac{F_{i}}{4} ]| ≤ \frac{3}{8} .

By Corollary 8, we get

∑_{i=1}^{n} [\frac{F_{i}}{4} ] = [\frac{F_{n+2}}{4} − \frac{3}{8}] = ⌊\frac{F_{n+2}}{4} ⌋ = ⌈\frac{F_{n+2} − 3}{4}⌉ .

4 Observations and conjectures

Let a and m be relatively prime positive integers. To determine the arithmetic mean defined by (31) for floor function we have to determine the sum

∑_{i=1}^{ord_{m}(a)} (a^{i} mod m) .  (39)

Taking into account the relation

∑_{i=1}^{ord_{m}(a)} a^{i} = \frac{a(a^{ord_{m}(a)} − 1)}{a − 1} ,

and that

∑_{i=1}^{ord_{m}(a)} (a^{i} mod m) ≡ ∑_{i=1}^{ord_{m}(a)} a^{i} (mod m) ,

we deduce that, when a − 1 and m are relatively primes, the sum (39) is divisible to m. Using Maple to determine this sum, we notice the following relation.

Conjecture 1. Let a and m be relatively prime positive integers. If a−1 and m are relatively prime and ord_{m}(a) is even then

∑_{i=1}^{ord_{m}(a)} (a^{i} mod m) = \frac{m · ord_{m}(a)}{2} .

Using Maple to determine the value of some sums as

∑_{i=1}^{ord_{m}(a)} ((2a^{i} + m) mod 2m) ,

necessary to determine the arithmetic mean (31) for round function, we notice another interesting identity.

Conjecture 2. Let a and m be relatively prime positive integers. If m is prime and ord_{m}(a) is even then

∑_{i=1}^{ord_{m}(a)} ((2a^{i} + m) mod 2m) = m · ord_{m}(a) .

By (36), we deduce that the sum of π(m) consecutive Fibonacci numbers is a multiple of m. This allows us to state the sum

∑_{i=1}^{π(m)} (F_{i} mod m)

is multiple of m. Using Maple to determine the arithmetic mean defined by (37), we notice the following identity:

Conjecture 3. Let m be a positive integer, m > 1. Then

∑_{i=1}^{π(m)} (F_{i} mod m) = m · w(m) ,

where w(m) is Fibonacci winding number (sequence \underline{A088551} in [10]).

5 Acknowledgements

The author would like to thank the anonymous referees for their valuable comments and suggestions for improving the original version of this manuscript. The author would like to express his gratitude for the careful reading and helpful remarks to Oana Merca, which have resulted in what is hopefully a clearer paper.

References

[1] T. Andreescu, D. Andrica, and Z. Feng, 104 Number Theory Problems, Birkhäuser Boston, 2007.

[2] D. H. Bailey, J. M. Borwein, and R. Girgensohn, Experimental evaluation of Euler sums, Experiment. Math. 3 (1994), 17–30.

[3] D. H. Bailey, P. B. Borwein, and S. Plouffe, The rapid computation of various polylogarithmic constants, Math. Comp. 66 (1997), 903–913.

[4] J. D. Fulton and W. L. Morris, On arithmetical functions related to the Fibonacci numbers, Acta Arith. 16 (1969), 105–110.

[5] R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, Addison-Wesley, 1989.

[6] D. E. Knuth, Johann Faulhaber and sums of powers, Math. Comp. 61 (1993), 277–294.

[7] T. Koshy, Discrete Mathematics with Applications, Elsevier Academic Press, 2004.

[8] M. Merca, Problem 78, Eur. Math. Soc. Newsl. 79 (2011), 52.

[9] M. Petkovšek, H. S. Wilf, D. Zeilberger, A=B, A. K. Peters Ltd., 1996.

[10] N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences. Published electroni-

   cally at http://oeis.org, 2010.

[11] D. D. Wall, Fibonacci series modulo m, Amer. Math. Monthly 67 (1960), 525-532.

2010 Mathematics Subject Classification: Primary 11B50; Secondary 11B34, 11B37, 11B39, 11B68, 26D07, 26D15. Keywords: Sequences (mod m), Fibonacci numbers, Bernoulli numbers, Pisano period, power sums, integer function.

(Concerned with sequences \underline{A000045}, \underline{A000975}, \underline{A001175}, \underline{A004697}, \underline{A014817}, \underline{A014785}, \underline{A026039}, \underline{A033113}, \underline{A033114}, \underline{A033115}, \underline{A033116}, \underline{A033117}, \underline{A033118}, \underline{A033138}, \underline{A033119}, \underline{A070333}, \underline{A077854}, \underline{A088551}, \underline{A097137}, \underline{A097138}, \underline{A097139}, \underline{A122046}, \underline{A131941}, \underline{A153234}, \underline{A156002}, \underline{A171965}, \underline{A172046}, \underline{A172131}, \underline{A173196}, \underline{A173645}, \underline{A173690}, \underline{A173691}, \underline{A173721}, \underline{A173722}, \underline{A175287}, \underline{A175724}, \underline{A175766}, \underline{A175780}, \underline{A175812}, \underline{A175822}, \underline{A175826}, \underline{A175827}, \underline{A175829}, \underline{A175831}, \underline{A175842}, \underline{A175846}, \underline{A175848}, \underline{A175864}, \underline{A175868}, \underline{A175869}, \underline{A175870}, \underline{A177041}, \underline{A177100}, \underline{A177166}, \underline{A177176}, \underline{A177189}, \underline{A177205}, \underline{A177237}, \underline{A177239}, \underline{A177277}, \underline{A177332}, \underline{A177337}, \underline{A177339}, \underline{A177881}, \underline{A178222}, \underline{A178397}, \underline{A178420}, \underline{A178452}, \underline{A178455}, \underline{A178543}, \underline{A178577}, \underline{A178703}, \underline{A178704}, \underline{A178706}, \underline{A178710}, \underline{A178711}, \underline{A178719}, \underline{A178730}, \underline{A178742}, \underline{A178744}, \underline{A178750}, \underline{A178826}, \underline{A178827}, \underline{A178828}, \underline{A178829}, \underline{A178872}, \underline{A178873}, \underline{A178874}, \underline{A178875}, \underline{A178982}, \underline{A179001}, \underline{A179006}, \underline{A179018}, \underline{A179041}, \underline{A179042}, \underline{A179053}, \underline{A179111}, \underline{A181120}, \underline{A181286} and \underline{A181640}.)

Received February 16 2011; revised versions received July 7 2011; September 5 2011. Published in Journal of Integer Sequences, October 16 2011.

Return to Journal of Integer Sequences home page.