math.NT — Number Theory
The parity of the prime-counting function in time
Computing the prime-counting function exactly takes steps by the analytic method of Lagarias and Odlyzko, and to our knowledge its parity is known faster only on short intervals: Tao, Croot and Helfgott decide whether an interval of length at most near contains an odd number of primes in time . However, their identity needs the Mobius function for all , and we know of no bound of the form for the parity, even conditionally. We present deterministic algorithms that output and the parity of the number of primes in any interval in time , where is the input bit length. Our approach replaces by its residue modulo 2, which is the squarefree indicator again: the number of chains , of depth is odd exactly when is squarefree, for . The parity of on is then the parity of one count of tuples satisfying multiplications, which Anthropic's counting engine evaluates through a network whose variables have geometrically shrinking widths. We prove both theorems in Lean 4 (piParity_TM_rate, piIntervalParity_TM_rate; axioms propext, Classical.choice, Quot.sound). The result does not give deterministic prime finding or the exact value of : the parity can be even on every interval one queries, and exact counts seem to need iterated products, for whose product-tree verifiers we prove a lower bound in Lean. The constants are astronomical, and the result rests on Anthropic's Lean development of its claimed refutation of the Exponential Time Hypothesis, which is under review.