{"id":"e4ac491c-8c55-4615-9802-a02bf270e6aa","arxiv_id":"2607.21259","paper_version":1,"verdict":"CONDITIONAL","confidence":"MODERATE","novelty_score":7.0,"correctness_risk":"low","formal_verification":"none","parameter_count":0,"one_line_summary":"Polynomial residues over a half-interval are equidistributed to within O_φ(√p log^2 p), with an exact class-number formula for x^2 and an unconditional √p log log p lower bound that refutes Sun's conjecture.","lead":"This paper counts how often the fractional part of a polynomial value divided by a prime p falls in the upper half of the unit interval, for inputs running over the first half of the nonzero residues. It proves near-square-root error bounds and, for quadratic polynomials, an exact formula in terms of imaginary quadratic class numbers.","discovery_kind":"extension","skeptic_critique":{"model":"deepseek-v4-flash","headline":"Lower-bound refutation of Sun's conjecture rests on imported Ω-result for L(1,χ_p) (Lemma 2.6) whose exact prime-modulus statement is not verified in the paper.","rationale":"The paper's core argument is internally sound: I checked the Fourier-expansion reduction, the exact Legendre-symbol evaluation of f2(p), the use of Dirichlet's class number formula, and the character expansion in Theorem 1.7. No algebraic slip or circular step appears. The single most load-bearing point is the unconditional lower bound, which depends entirely on the imported Ω-result for L(1,χ_p). The reader's weakest_assumption correctly identified Lemma 2.6 (and secondarily Korolev's bound, which affects only the improved quadratic upper bound, not the disproof). Since the manuscript cites the result without quoting hypotheses, a careful referee must verify that the BCE theorem applies to prime moduli p≡3 mod4. This is a verification issue, not a demonstrated flaw; if the check passes, the central claim stands. Therefore the reader's CONDITIONAL verdict should be maintained, pending that external verification. The abstract's 'best possible' phrasing is slightly strong because the upper bound is GRH-conditional, but this does not affect the mathematical content.","tokens_in":9372,"tokens_out":22726,"duration_ms":218173,"concrete_test":"Verify the citation: locate Bateman–Chowla–Erdős, Publ. Math. Debrecen 1 (1950), 165–182, and check whether Theorem 1(C) indeed asserts an absolute c>0 with L(1,χ_p)>c log log p for infinitely many primes p≡3 mod4. Alternatively, independently prove the needed Ω-result by the standard CRT/Dirichlet construction: for each y, pick a residue class r modulo Q=4∏_{ℓ≤y}ℓ with r≡3 mod4 and (r/ℓ)=(-1)^{(ℓ-1)/2} for every odd ℓ≤y (so that (ℓ/p)=1 for all ℓ≤y by quadratic reciprocity); by Dirichlet and Linnik choose a prime p in this class with p≤Q^L. Then L(1,χ_p)≥∏_{ℓ≤y}(1-1/ℓ)^{-1}≫log y≫log log p, yielding infinitely many primes. If either check confirms the lemma, the concern is resolved.","verdict_should_be":"UNCHANGED","load_bearing_attack":"The central claim is Theorem 1.6: an exact formula for f2(p) plus the unconditional lower bound |f2(p)-p/4| ≫ √p log log p for infinitely many p, which refutes Sun's O(√p) conjecture. The internal derivation of the exact formula is coherent: f2(p) = (p-1)/4 + (1/2)((-1)/p) Σ_{n≤(p-1)/2}(n/p), and Lemma 2.5 converts the sum into h(-p) for p≡3 mod4. The only external input that boosts this from O(1) to ≫√p log log p is Lemma 2.6, quoted as 'Bateman–Chowla–Erdős [1], Theorem 1(C)': there is c>0 with L(1,χ_p)>c log log p for infinitely many primes p≡3 mod4. The paper does not restate the original hypotheses, nor does it justify that the BCE Ω-result holds for prime moduli p≡3 mod4 (rather than for general fundamental discriminants) or that the constant is absolute and effective. Since the lower-bound disproof of Sun's conjecture and the 'log log p is best possible' claim collapse if Lemma 2.6 fails in this exact form, this is the load-bearing assumption. All other lemmas (Weil, Korolev, GRH character sums) are standard and correctly applied; no internal inconsistency was found.","agreement_with_reader":"agree"},"referee_report":{"model":"deepseek-v4-flash","summary":"This paper studies a finite analogue of Weyl equidistribution: for a fixed polynomial φ over Z and an odd prime p, it counts k in the lower half-interval I={1,...,(p-1)/2} for which the fractional part of φ(k)/p lies in the upper half J={(p+1)/2,...,p-1}. The main unconditional result (Theorem 1.1) is f_φ(p)=p/4+O_φ(√p log^2 p), obtained by expanding the indicator of J in finite Fourier series and applying the Weil bound to the complete sums. For quadratic polynomials and for polynomials with a reflection symmetry φ(c−x)=φ(x), the error is improved to O_φ(√p log p). For even monomials x^m, a character-sum argument under GRH yields O_m(√p log log p) (Theorem 1.7). The central result is Theorem 1.6, an exact class-number formula for m=2: f_2(p)=(p-1)/4 for p≡1 mod4, and (p-1)/4 - (3/2)h(-p) or (p-1)/4 - (1/2)h(-p) for p≡3 mod8 or p≡7 mod8. Combined with the class-number formula and an Ω-result for L(1,χ_p), this gives |f_2(p)-p/4|≫√p log log p infinitely often, disproving Sun's conjectured O(√p) error term. A final section generalizes the method to a fundamental domain for the d-th roots of unity.","tokens_in":9631,"tokens_out":25606,"duration_ms":223505,"significance":"Assuming the lower-bound input is correctly quoted, the paper settles the quadratic case of Sun's 2018 problem: the error is not O(√p), and the true upper order is √p log log p under GRH, matching the unconditional lower bound. The exact evaluation in Theorem 1.6 is a clean and valuable result, and the Fourier/character-sum framework is natural and clearly presented. The arguments are internally consistent; all external tools (Weil, Korolev, Montgomery–Vaughan, BCE) are standard and explicitly cited. The paper contains no fitted parameters and no circular reasoning, and the main claims are falsifiable. The novelty is incremental in method but decisive for the specific conjecture.","major_comments":[{"comment":"The unconditional lower bound, and hence the disproof of Sun's conjecture, rests on Lemma 2.6. As stated, Lemma 2.6 is quoted from [1, Theorem 1(C)] but its original hypotheses are not given; the authors should either reproduce the statement from [1] or prove the specialization to primes p≡3 mod4. In addition, the proof passes from h(-p)=√p/π L(1,χ_K) to the lower bound by invoking Lemma 2.6, which is stated for L(1,χ_p) with χ_p(n)=(n/p). The equality of χ_K (the character of Q(√-p)) and χ_p for p≡3 mod4 is true but is not stated; without it the application is not justified. Since this is the load-bearing step for the central claim, it must be fixed.","section":"Lemma 2.6; Proof of Theorem 1.6 (Section 4)"},{"comment":"The O_φ(√p log p) quadratic bound uses max_{a≠0}|S(a)| and asserts that Lemma 2.3 gives a bound uniform in a. Lemma 2.3 is stated for one fixed quadratic polynomial f(x)=Ax^2+Bx+C with p∤A; the text does not explicitly state that the constant 7.0508 is independent of the coefficients A,B,C (and hence of the multiplier a). The authors should quote the precise theorem from [3] or [2] guaranteeing uniformity over all coefficients (or over a∈F_p^*) so that the max over a is justified.","section":"Lemma 2.3; Proof of Theorem 1.3 (Section 3)"}],"minor_comments":[{"comment":"The sentence 'which counts the quadratic residues of elements in J belonging to I' is confusing; it should read 'which equals the number of quadratic residues in J'.","section":"Section 4, Proof of Theorem 1.6"},{"comment":"The phrase 'factor log log p is best possible' should be qualified as conditional on GRH, since the only matching upper bound cited (Littlewood) is GRH-conditional. The unconditional result alone shows only that the error is not O(√p).","section":"Abstract and Remark 4.1"},{"comment":"Please give a more precise reference for the quoted theorem, including page or theorem number from [1], and state explicitly whether the constant is effective. This would also help verify the prime-modulus specialization.","section":"Lemma 2.6"},{"comment":"The main term is first written as (p-1)^2/(4p) and later simplified to p/4+O(1). It may help the reader to state at the outset that the difference is absorbed into the error term.","section":"Proof of Theorem 1.1"}],"recommendation":"major_revision","confidential_remarks":"The internal derivations are coherent and the central claims are defensible. The main risk is the accurate quotation of the Bateman–Chowla–Erdős Ω-result and the missing identification of χ_K with χ_p; both are easy to fix but load-bearing. If the authors supply those details, I would view the paper as acceptable. The paper is a good fit for the journal's scope."},"author_rebuttal":null,"desk_editor":{"model":"deepseek-v4-flash","letter":"The short version: this is a real paper. The exact formula for f_2(p) in terms of h(-p) and the unconditional lower bound |f_2(p)-p/4| >> sqrt(p) log log p are new and, as far as I can tell, correct. The proof that this disproves Sun's O(sqrt(p)) conjecture is straightforward once the exact formula is in hand. The general bound O_phi(sqrt(p) log^2 p) and the quadratic refinement are not surprising, but the symmetric-polynomial treatment is neat.\n\nThe internal mathematics is consistent: the finite Fourier expansions, the inclusion-exclusion for symmetric phi, the character expansion for even monomials, and the conversion to class numbers all check out. I did not find circularity or hidden parameters. The GRH-conditional result for even monomials is a clean application of standard incomplete character sum bounds.\n\nThe soft spots are mostly in the packaging. The abstract says the log log factor is \"best possible\" and a \"matching\" lower bound, but the matching upper bound rests on GRH; that should be said in the first paragraph. More importantly, the stress-test note is right to focus on Lemma 2.6. The proof of Theorem 1.6 needs L(1, chi_K) > c log log p for the character of Q(sqrt(-p)), but Lemma 2.6 is stated for the Legendre symbol chi_p(n) = (n/p). For p ≡ 3 mod 4 those are different characters. This is not a fatal flaw — the same CRT-style construction should give the lower bound for chi_K directly — but it has to be either quoted accurately or proved in a paragraph. As written, the load-bearing step rests on a lemma whose hypotheses don't match the application. A referee should insist on a clean statement before accepting.\n\nThe reliance on Korolev's incomplete Gauss sum bound and on Washington's class number identity is fine; those are standard and the forms used are plausible. Quoting the original hypotheses would be good hygiene but is not a mathematical issue.\n\nWho is this for? Anyone working on incomplete exponential sums, polynomial residues, or the fine distribution of fractional parts. It deserves a serious referee. With the Lemma 2.6 mismatch fixed and the abstract qualified, I'd accept it. As is, it's a conditional accept that should not take long to resolve.","headline":"A real paper with one clean new result — exact class-number evaluation for the quadratic case and unconditional sqrt(p) log log p lower bound — and a load-bearing lemma that needs a cleaner statement before acceptance.","tokens_in":10195,"tokens_out":16197,"would_cite":true,"duration_ms":149608,"reading_group":"maybe","serious_thinker":"yes","would_accept_peer_review":true},"rs_alignment":null,"lean_confirmation":null,"pith_extraction":{"msc":["11L07","11L40","11T23"],"pacs":[],"model":"deepseek-v4-flash","headline":"The paper proves an exact formula for a quadratic residue counting function and uses it to refute Sun's conjectured O(√p) error bound.","keywords":["fractional parts","polynomials modulo p","incomplete exponential sums","Weil bound","Dirichlet class number formula","L(1, χ) extreme values","quadratic residues","Generalized Riemann Hypothesis"],"falsifier":"For a sequence of large primes p ≡ 3 (mod 8), compute f₂(p) directly by brute force and compare with (p−1)/4 − (3/2)h(−p) (with h(−p) computed independently). If the difference is nonzero for any p > 3, the exact formula is false. More decisively, if for all primes up to some large X the ratio |f₂(p) − p/4| / √p remains bounded (e.g., by a constant less than 1), then the claimed infinite subsequence with ≫ √p log log p does not exist and the lower bound is wrong.","tokens_in":9196,"feed_emoji":"🔢","tokens_out":2121,"duration_ms":21784,"temperature":0.7,"pith_summary":"This paper studies how often the fractional part of a polynomial evaluated modulo an odd prime p lies in the upper half of the unit interval, with the variable restricted to 1 ≤ x < p/2. For quadratic polynomials, the authors prove an exact formula relating the count to the class number of the imaginary quadratic field Q(√−p), and then use extreme values of Dirichlet L-functions to show the error term can be as large as √p log log p for infinitely many primes. This disproves Zhi-Wei Sun's 2018 conjecture that the error term is O(√p). Under the Generalized Riemann Hypothesis, the paper obtains a matching upper bound for all even monomials. The results give, for the first time, the true order of the error term in the quadratic case.","feed_headline":"Quadratic residue count breaks the √p error bound","feed_subtitle":"Exact class-number formula shows the error can be as large as √p log log p, disproving a 2018 conjecture.","key_machinery":"The proof uses finite Fourier expansions to express the indicator function of the upper half-interval as an exponential sum, converting the counting problem into estimates of incomplete Gauss sums. For general polynomials the Weil bound controls the complete sums; for quadratics an explicit incomplete-Gauss-sum bound (due to Korolev) removes one logarithm; for symmetric polynomials the half-interval sum is completed to a full exponential sum via an involution. For monomials x^m, the count is rewritten using Dirichlet characters restricted to the upper half of the field, and the error term becomes a sum of incomplete character sums whose GRH-conditional bound is O(√p log log p). The exact qua","core_discovery":"The central discovery is Theorem 1.6: for any odd prime p > 3, the number f₂(p) of k in the half-interval 1 ≤ k < p/2 with {k²/p} > 1/2 is exactly (p−1)/4 when p ≡ 1 mod 4, (p−1)/4 − (3/2)h(−p) when p ≡ 3 mod 8, and (p−1)/4 − (1/2)h(−p) when p ≡ 7 mod 8, where h(−p) is the class number. Combining this with Dirichlet's class number formula and an unconditional lower bound for L(1, χ_p), the authors obtain |f₂(p) − p/4| ≫ √p log log p for infinitely many primes p, refuting Sun's conjectured O(√p) error. They further show that, assuming GRH, the upper bound O_m(√p log log p) holds for every even monomial x^m, so the log log p factor is essentially the right order in the quadratic case.","pith_inferences":["One testable extension is to check the exact formula computationally for primes up to a few thousand; any deviation would not only disprove Theorem 1.6 but also reveal a flaw in the class-number relation, a stronger check than the asymptotics.","The lower-bound argument likely carries over to other quadratic forms (e.g., φ(x)=ax²+bx+c) by similar class-number identities, which would extend the refutation of Sun's conjecture to a family of polynomials, not just the monomial.","The connection to L(1, χ) suggests that the true distribution of f₂(p) is governed by the same fluctuations that give Littlewood's bounds, so under GRH one expects the log log p lower bound to hold for almost all primes, not just a sparse subsequence.","The method of using a fundamental domain for the d-th roots of unity (Theorem 1.8) may generalize to counting functions on higher-dimensional tori, where Fourier expansion and Weil-type bounds remain effective."],"forward_implications":["Sun's conjecture that f_m(p) = p/4 + O_m(√p) is false at least for m = 2; the true error is often as large as √p log log p.","The exact formula gives a deterministic O(p) algorithm for computing f₂(p) once h(−p) is known, and conversely the count can be used to compute class numbers in this range.","The matching GRH-conditional upper bound for all even monomials indicates that the log log p factor is a genuine feature of the half-interval distribution, not an artifact of the proof.","The refined O(√p log p) bound for symmetric polynomials shows that reflection symmetry is a sufficient structural condition for removing one logarithm, suggesting that other group symmetries (as in Theorem 1.8) behave similarly."],"fun_headline_variants":["Exact formula for quadratic residues disproves √p conjecture","Class number formula settles residue distribution error","Quadratic residues: exact count, √p log log p error","Distribution of squares mod p pinned down exactly","Symmetric polynomial residues break √p error bound"],"cache_read_input_tokens":2304,"weakest_assumption_plain":"The unconditional lower bound (Lemma 2.6) asserts that L(1, χ_p) > c log log p for infinitely many primes p ≡ 3 mod 4; if this 1950 theorem does not apply to prime moduli in exactly this form, the claimed refutation of Sun's O(√p) conjecture collapses.","fun_headline_variants_meta":{"raw":{"variants":["Exact formula for quadratic residues disproves √p conjecture","Class number formula settles residue distribution error","Quadratic residues: exact count, √p log log p error","Distribution of squares mod p pinned down exactly","Symmetric polynomial residues break √p error bound"]},"model":"deepseek-v4-flash","effort":"low","cost_usd":0.000694,"raw_usage":{"total_tokens":3011,"prompt_tokens":815,"completion_tokens":2196,"prompt_tokens_details":{"cached_tokens":256},"prompt_cache_hit_tokens":256,"prompt_cache_miss_tokens":559,"completion_tokens_details":{"reasoning_tokens":2122}},"tokens_in":559,"tokens_out":2196,"duration_ms":18427,"temperature":1.0,"reasoning_tokens":2122,"cache_read_input_tokens":256,"cache_creation_input_tokens":0},"cache_creation_input_tokens":0},"created_at":"2026-08-01T08:01:42.545131+00:00","model_set":{"reader":"deepseek-v4-flash"},"falsifier":"For a sequence of large primes p ≡ 3 (mod 8), compute f₂(p) directly by brute force and compare with (p−1)/4 − (3/2)h(−p) (with h(−p) computed independently). If the difference is nonzero for any p > 3, the exact formula is false. More decisively, if for all primes up to some large X the ratio |f₂(p) − p/4| / √p remains bounded (e.g., by a constant less than 1), then the claimed infinite subsequence with ≫ √p log log p does not exist and the lower bound is wrong.","supporting_citations":[],"review_version":1}