Counting functions for joint conditions #
A positive integer N is a base-b dead end: N is square-free, yet b * N + d
fails to be square-free for every digit d ∈ {0, …, b - 1}.
Equations
- LeanPool.DeadEnds.IsBaseBDeadEnd b N = (0 < N ∧ Squarefree N ∧ ∀ d ∈ Finset.range b, ¬Squarefree (b * N + d))
Instances For
Equations
The number of base-b dead ends in [1, X].
Equations
- LeanPool.DeadEnds.countBaseBDeadEnds b X = {N ∈ Finset.Icc 1 X | LeanPool.DeadEnds.IsBaseBDeadEnd b N}.card
Instances For
The asymptotic density of base-b dead ends equals D, i.e.
countBaseBDeadEnds b X / X → D as X → ∞.
Equations
- LeanPool.DeadEnds.HasAsymptoticDensity b D = Filter.Tendsto (fun (X : ℕ) => ↑(LeanPool.DeadEnds.countBaseBDeadEnds b X) / ↑X) Filter.atTop (nhds D)
Instances For
The joint square-free density α(b, T) = ∏_p μ_p(b, T), the infinite product
over all primes.
Equations
- LeanPool.DeadEnds.jointSquarefreeDensity b T = ∏' (p : Nat.Primes), LeanPool.DeadEnds.localDensityFactor (↑p) b T
Instances For
The explicit inclusion-exclusion formula ∑_{T ⊆ {0,…,b-1}} (-1)^{|T|} α(b, T) for D_b.
Equations
- LeanPool.DeadEnds.explicitDensityFormula b = ∑ T ∈ (Finset.range b).powerset, (-1) ^ T.card * LeanPool.DeadEnds.jointSquarefreeDensity b T
Instances For
Count N in [1,X] such that N is squarefree and bN+d is squarefree for all d in T
Equations
- LeanPool.DeadEnds.countJointSquarefree b T X = {N ∈ Finset.Icc 1 X | Squarefree N ∧ ∀ d ∈ T, Squarefree (b * N + d)}.card
Instances For
Helper lemmas for summability of local density deviations #
The residues r ∈ [0, p²) divisible by p² (just r = 0).
Equations
- LeanPool.DeadEnds.typeA p = {r ∈ Finset.range (p ^ 2) | p ^ 2 ∣ r}
Instances For
The sum ∑_p |μ_p(b,T) - 1| converges. By localDensityFactor_near_one, |μ_p - 1| ≤ (|T|+1)/p². Since ∑_p 1/p² converges (it's bounded by ∑_n 1/n² = π²/6), the sum converges.
Multipliability from summability of deviations.
Write μ_p = 1 + (μ_p - 1). If ∑|μ_p - 1| converges, then ∏ μ_p converges.
Mathlib's Multipliable.of_norm_bounded or related lemmas apply when the factors
are close to 1, which follows from sum_localDensityFactor_deviation_summable.