Maths WorkshopMaths problems with full solutions
Exercise 1230Algebra › Equations and radicalsOlympiadAdded 4 Nov 2026

Hermite's identity for floor functions

#floor function#fractional part#Hermite identity

Statement

1. Prove Hermite's identity: for every real xx and integer n≥1n\ge1,
⌊x⌋+⌊x+1n⌋+⌊x+2n⌋+⋯+⌊x+n−1n⌋=⌊nx⌋.\lfloor x\rfloor+\left\lfloor x+\tfrac1n\right\rfloor+\left\lfloor x+\tfrac2n\right\rfloor+\dots+\left\lfloor x+\tfrac{n-1}n\right\rfloor=\lfloor nx\rfloor.
2. Deduce that for integers m≥0m\ge0 and n≥1n\ge1: ∑k=0n−1⌊m+kn⌋=m\displaystyle\sum_{k=0}^{n-1}\left\lfloor\frac{m+k}n\right\rfloor=m.

Hint

Write x=⌊x⌋+fx=\lfloor x\rfloor+f with 0≤f<10\le f<1. In the sum, the terms are ⌊x⌋\lfloor x\rfloor or ⌊x⌋+1\lfloor x\rfloor+1: find from which index kk the term jumps.

Show solutionHide solution

Solution

1. Put x=N+fx=N+f with N=⌊x⌋N=\lfloor x\rfloor and 0≤f<10\le f<1. Then ⌊x+kn⌋=N+⌊f+kn⌋\lfloor x+\frac kn\rfloor=N+\lfloor f+\frac kn\rfloor, and ⌊f+kn⌋∈{0,1}\lfloor f+\frac kn\rfloor\in\{0,1\}. It equals 11 iff f+kn≥1f+\frac kn\ge1, i.e. k≥n−nfk\ge n-nf, equivalently k≥n−⌊nf⌋k\ge n-\lfloor nf\rfloor.

So among k=0,…,n−1k=0,\dots,n-1, the number of terms equal to N+1N+1 is ⌊nf⌋\lfloor nf\rfloor. Hence the left side is
nN+⌊nf⌋=⌊nN+nf⌋=⌊nx⌋.nN+\lfloor nf\rfloor=\lfloor nN+nf\rfloor=\lfloor nx\rfloor.

2. Take x=mnx=\frac mn: then ⌊nx⌋=m\lfloor nx\rfloor=m, and the identity becomes ∑k=0n−1⌊m+kn⌋=m\sum_{k=0}^{n-1}\left\lfloor\frac{m+k}n\right\rfloor=m.

Example. m=100m=100, n=7n=7: the terms are 14,14,14,14,14,15,1514,14,14,14,14,15,15, whose sum is 100100 ✓.

Lesson. To handle floor functions, split into integer and fractional parts and find where the fractional part crosses an integer threshold.