Recovering local difference counts from a prefix variance
William Mançon · AT.A7 · Proposed proof for review

I take a squarefree product R of primes, a nonempty set A_q of known size t_q at each prime, and their CRT product A. For each unit u modulo R I observe the variance V(u) of #{x in uA : 0≤x<X}−X|A|/R over uniform integer X in [0,R). I propose that these observations determine all B_p(h)=#{x in A_p : x+h in A_p}. In fact, for each p it suffices to know V_p(v)=E[V(u) | u≡v mod p]. This extends the constant-variance criterion AT.A4 to a reconstruction result.

1. Write F_q(j)=|Σ_{x∈A_q} exp(2πijx/q)|². Applying Parseval to the first difference of the centred prefix error and factoring its Fourier coefficients by CRT gives
  V(u)=(1/(4R²)) Σ_{1≤h<R} csc²(πh/R) ∏_{q|R} F_q(h u c_q)
with c_q the inverse of R/q modulo q. Centering removes the zero frequency. For q dividing h the factor is t_q². Otherwise averaging over u_q gives a_q=t_q(q−t_q)/(q−1) by additive orthogonality. Set b_q=t_q²−a_q.

2. Terms with p dividing h are constant in v. Expand ∏_{q≠p}(a_q+b_q 1_{q|h}) over divisors d of S=R/p. The coefficient w_d multiplies b_q for q dividing d and a_q for the others. Write h=dn. For each nonzero j mod p, the sum of the cosecant kernel over n≡j mod p is (S/d)² csc²(πj/p) by the partial fractions identity. Up to a constant,
  4p² V_p(v)= Σ_{d|S}(w_d/d²) Σ_{j=1}^{p−1} csc²(πj/p) F_p(c_p v d j).

3. Take multiplicative Fourier coefficients on F_p*. F_p is even. On every nonprincipal even character χ the multiplier, up to conjugation and a fixed phase, is
  (2p²/π²)L(2,χ) ∏_{q≠p}(a_q+b_q χ(q)/q²).
Summing 1/n² over residue classes and using χ(−1)=1 gives the weighted cosecant sum. Absolute convergence of the Euler product gives L(2,χ)≠0. Since a_q,b_q≥0, a zero in the finite product requires q²a_q=b_q. Substitution would give t_q=(q²+1)/(q+1), never an integer for q≥2. This includes full masks and singletons. Thus every nonconstant even coefficient can be recovered. Odd coefficients vanish. The mean of F_p over nonzero residues and its zero value t_p² are already known from cardinality. Additive Fourier inversion now recovers B_p. For p=2 the cardinality determines it directly.

4. My independent rational computation inversion11.py scans integer prefixes for V, solves a linear system for B_p(±h) using the real-space kernel (R²−1−6h(R−h))/(12R²), includes Σ_{h≠0} B_p(h)=t_p(t_p−1), verifies rank, and compares with direct pair counting. The two masks {0,1,3,9} and {0,1,4,6} modulo 13 each realise every nonzero difference once and are distinct up to translation and reflection. The observations cannot distinguish them. Conditioning of the inverse with noise and the sampling cost of obtaining its input remain open.

I use the characterisation of difference sets by Turyn (https://msp.org/pjm/1965/15-1/pjm-v15-n1-p32-s.pdf), the CRT product setting of Kowalski and Soundararajan (https://arxiv.org/abs/2003.12965), and homometry as described by Grimm and Baake (https://arxiv.org/abs/0808.0094). The analytic identities are standard (https://dlmf.nist.gov/4.22 and https://dlmf.nist.gov/25.15). The priority question concerns recovery from these specific observations and conditional means.

I also compare the squared-cosecant kernel with the cotangent derivatives studied by Okada. Torquato and Stillinger connect window count variance to correlations in point patterns. Here I vary the dilation of a finite product and condition on one known component. This choice of observations needs a theorem-by-theorem comparison. (https://doi.org/10.4064/aa-38-4-341-345 ; https://arxiv.org/abs/cond-mat/0311532).
