Definition of irreducible polynomial with positive leading coefficient
Equations
- IsIrreducibleWithPosLeading f = (Irreducible f ∧ 0 < f.leadingCoeff)
Instances For
The compatibility condition for a finite set S
of polynomials in the Bateman-Horn conjecture.
This states that for all primes p
, there exists an n
such that ∏ f ∈ S, f.eval n
is non-zero modulo p
.
Equations
- SatisfiesCompatibilityCondition polys = ∀ (p : ℕ), Nat.Prime p → ∃ (n : ℤ), ¬↑p ∣ Polynomial.eval n (polys.prod id)
Instances For
OmegaP S p
counts the number of residue classes mod p
where at least one polynomial in S
vanishes.
Equations
- OmegaP polys p = {n : ZMod p | ∃ f ∈ polys, Polynomial.eval n (Polynomial.map (Int.castRingHom (ZMod p)) f) = 0}.ncard
Instances For
The Bateman-Horn constant of a set of polynomials S
. This is defined as the infinite product over all primes:
$$\prod_p (1 - \frac{1}{p}) ^ {|S|} (1 - \frac{\omega_p(S)}{p}$$ where $\omega_p(S)}{p}$ is the number of residue classes mod $p$ where at least one polynomial in $S$ vanishes.
Equations
Instances For
CountSimultaneousPrimes S x
counts the number of n ≤ x
at which all polynomials in S
attain a prime value.
Equations
- CountSimultaneousPrimes polys x = (Finset.filter (fun (n : ℕ) => ∀ f ∈ polys, Nat.Prime (Polynomial.eval (↑n) f).natAbs) (Finset.range (⌊x⌋₊ + 1))).card
Instances For
The Bateman-Horn Conjecture
Given a finite collection of distinct irreducible polynomials f₁, f₂, ..., fₖ ∈ ℤ[X] with positive leading coefficients that satisfy the compatibility condition, the number of positive integers n ≤ x for which all polynomials f₁(n), f₂(n), ..., fₖ(n) are simultaneously prime is asymptotic to:
C(f₁, f₂, ..., fₖ) · x / (log x)^k
where C(f₁, f₂, ..., fₖ) is the Bateman-Horn constant given by the convergent infinite product:
C = ∏ₚ (1 - 1/p)^(-k) · (1 - ωₚ/p)
Here ωₚ is the number of residue classes modulo p for which at least one polynomial vanishes.
The compatibility condition ensures that for each prime p, there exists some integer n such that p does not divide the product f₁(n)·f₂(n)·...·fₖ(n), which guarantees the infinite product converges to a positive value.