A dyadic bound for over a divisor
ProvedDivisorSums.sum_sqrt_gcd_dyadic_le_of_dvdA dyadic block sum of .
Let with . Then over any dyadic block,
where is the number of divisors of .
The block has terms, and the weight can be as large as , so the trivial bound is . The content is that the true size is : sorting by , the number of in the block divisible by is at most , so each divisor contributes at most , and there are at most divisors to consider.
Dyadic blocks are the natural unit here because the count is only useful when the block length is comparable to its endpoints; summing such blocks recovers bounds over full ranges with an extra logarithmic factor. Estimates of exactly this shape arise when bounding Kloosterman sums and in the large-sieve treatment of gcd-weighted averages.
Formalization note. k.divisors.card is , and the hypothesis lets the
divisor count of the larger modulus dominate that of .
import Mathlib
namespace DivisorSums
theorem sum_sqrt_gcd_dyadic_le_of_dvd {k₀ k M : ℕ} (hk : k ≠ 0) (hdvd : k₀ ∣ k) :
∑ m ∈ Finset.Ioc M (2 * M), Real.sqrt (Nat.gcd k₀ m : ℝ)
≤ 2 * M * (k.divisors.card : ℝ) := by sorry
end DivisorSums