Elementary counting formula for the number of $2k$-separated prime pair averages in an interval.
Proof of 2k-separated prime pairs in an interval, counting formula Let all intervals be of integers. Fix a natural number k ≥ 1 k \geq 1 k ≥ 1 . Primorial p n # p_n\# p n # is defined as usual to be p 1 p 2 ⋯ p n p_1 p_2 \cdots p_n p 1 p 2 ⋯ p n . Let an undeclared p p p or q q q just mean any prime number. Lemma 1. The number of x ∈ [ 0 , y ] x \in [0,y] x ∈ [ 0 , y ] such that x 2 = k 2 ( m o d p i ) x^2 = k^2 \pmod {p_i} x 2 = k 2 ( mod p i ) for no i = 1.. n i = 1..n i = 1.. n is given by: f ( y ) = ∑ d ∣ p n # , d ≤ y ( − 1 ) ω ( d ) ∑ c ∣ d , gcd ( c , 2 k ) = 1 ⌊ y − ( z c , d ) ( d ) d ⌋ (0) f(y) = \sum_{d \mid p_n\#, \ \\ d \leq y } (-1)^{\omega(d)}\sum_{c \mid d, \ \\ \gcd(c,2k) = 1} \lfloor \dfrac{y - (z_{c,d})_{(d)}}{d}\rfloor \tag{0} f ( y ) = d ∣ p n # , d ≤ y ∑ ( − 1 ) ω ( d ) c ∣ d , g c d ( c , 2 k ) = 1 ∑ ⌊ d y − ( z c , d ) ( d ) ⌋ ( 0 ) Where ( z c , d ) ( d ) (z_{c,d})_{(d)} ( z c , d ) ( d )