In mathematics, Hermite's identity, named after Charles Hermite, gives the value of a summation involving the floor function. It states that for every real number x and for every positive integer n the following identity holds:
∑
k
=
0
n
−
1
⌊
x
+
k
n
⌋
=
⌊
n
x
⌋
.
Split
x
into its integer part and fractional part,
x
=
⌊
x
⌋
+
{
x
}
. There is exactly one
k
′
∈
{
1
,
…
,
n
}
with
⌊
x
⌋
=
⌊
x
+
k
′
−
1
n
⌋
≤
x
<
⌊
x
+
k
′
n
⌋
=
⌊
x
⌋
+
1.
By subtracting the same integer
⌊
x
⌋
from inside the floor operations on the left and right sides of this inequality, it may be rewritten as
0
=
⌊
{
x
}
+
k
′
−
1
n
⌋
≤
{
x
}
<
⌊
{
x
}
+
k
′
n
⌋
=
1.
Therefore,
1
−
k
′
n
≤
{
x
}
<
1
−
k
′
−
1
n
,
and multiplying both sides by
n
gives
n
−
k
′
≤
n
{
x
}
<
n
−
k
′
+
1.
Now if the summation from Hermite's identity is split into two parts at index
k
′
, it becomes
∑
k
=
0
n
−
1
⌊
x
+
k
n
⌋
=
∑
k
=
0
k
′
−
1
⌊
x
⌋
+
∑
k
=
k
′
n
−
1
(
⌊
x
⌋
+
1
)
=
n
⌊
x
⌋
+
n
−
k
′
=
n
⌊
x
⌋
+
⌊
n
{
x
}
⌋
=
⌊
n
⌊
x
⌋
+
n
{
x
}
⌋
=
⌊
n
x
⌋
.