The closed form of at
ProvedGeometricSums.hasSum_sq_mul_geometric_invA quadratically weighted geometric series in closed form.
For an integer , writing ,
This is the second derivative-type identity in the geometric family: differentiating once gives , and applying the operator again and re-indexing produces the stated closed form, the numerator being what distinguishes from .
Restricting to with keeps , so the series converges absolutely and
the identity is an honest HasSum rather than a formal power-series manipulation.
Sums of this shape are the "local factors" appearing when a multiplicative quantity weighted by the square of the exponent — such as a divisor-function moment or the local density in a sieve — is expanded as an Euler product over primes; the closed form is what makes the resulting product estimable.
Formalization note. HasSum asserts unconditional summability to the stated value, which
is stronger than convergence of the partial sums; the hypothesis makes .
import Mathlib
namespace GeometricSums
theorem hasSum_sq_mul_geometric_inv {p : ℕ} (hp : 2 ≤ p) :
HasSum (fun k : ℕ => ((k : ℝ) + 1) ^ 2 * ((p : ℝ)⁻¹) ^ k)
((1 + (p : ℝ)⁻¹) / (1 - (p : ℝ)⁻¹) ^ 3) := by sorry
end GeometricSums