The sum of reciprocals of even numbers is half a harmonic number
ProvedHarmonicSums.even_sum_eq_half_harmonicharmonic-numbersnumber-theory
Reciprocals of the even numbers up to sum to half a harmonic number.
Writing each even as , the condition becomes , and ; factoring out leaves exactly . The floor is what makes the identity exact for both parities of .
The identity is the basic input for splitting a harmonic sum by parity, as in evaluating the alternating harmonic sum , and in sieve arguments where a residue class modulo is separated out before estimating the remainder.
Formalization note. harmonic m is Mathlib's (as a rational, cast to ),
and n / 2 is natural division, i.e. .
Preamble
import Mathlib
Formal statement
namespace HarmonicSums
theorem even_sum_eq_half_harmonic (n : ℕ) :
∑ i ∈ (Finset.Icc 1 n).filter (fun i => Even i), (i : ℝ)⁻¹
= (1 / 2 : ℝ) * harmonic (n / 2) := by sorry
end HarmonicSumsSource
Elementary. Lean proof extracted from the Salt project, https://github.com/jyh/salt (Apache-2.0, Jason Hickey).