Exact Formulas for Coprime Representations of Even Integers Avoiding a Prime

Abstract

Fix a prime p 5 and define g(2n,p)=\#\(h,k)∈Z>02 : h+k=2n,\; h k,\; (h,6p)=(k,6p)=1\. We derive explicit closed-form expressions for g(2n,p) in terms of the canonical remainder operator δk(x)=x-k x/k, elementary step functions, and the minimal solutions of the congruences 6x -1 p and 6x -5 p. A key ingredient is an explicit formula for the minimal solution of δk(a0 x)=b0 obtained via the Euclidean algorithm, which determines the excluded residue classes directly. The resulting formulas show that g(2n,p) is piecewise affine along arithmetic progressions of n, governed by residue classes modulo 3 and p. For fixed p, after precomputing two residue parameters in O( p) time, each evaluation of g(2n,p) requires only O(1) operations, compared to O(n) for direct enumeration. The formulas are validated computationally for all 2n 105 and primes p ∈ \5,7,11,13,17,19,23\, with perfect agreement with brute-force enumeration.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…