← Latest papers
🔢 mathematics

Exact Formulas for Coprime Representations of Even Integers Avoiding a Prime

This paper presents explicit closed-form formulas for counting coprime representations of even integers as sums of two positive integers coprime to 6p6p, enabling O(1)O(1) evaluation time by leveraging minimal solutions to specific congruences and residue class analysis.

Original authors: Andres M. Salazar

Published 2026-04-06
📖 5 min read🧠 Deep dive

Original authors: Andres M. Salazar

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a master chef trying to bake a giant cake that weighs exactly 2n pounds. You have a very specific rule for your ingredients: you can only use two positive integers (let's call them H and K) that add up to your total weight.

But there's a catch! You are allergic to three specific "flavors": the prime numbers 2, 3, and a special prime p (like 5, 7, or 11). Your ingredients H and K must be "pure," meaning they cannot be divisible by 2, 3, or your special prime p. Also, to keep things tidy, you always list the smaller ingredient first (H ≤ K).

The big question mathematicians have asked for a long time is: "For a cake of weight 2n, how many different pure pairs of ingredients (H, K) can I use?"

This paper, written by Andrés M. Salazar, solves this puzzle with a brand new, super-fast recipe.

The Old Way: Counting by Hand (The Slow Walk)

Before this paper, if you wanted to know the answer for a cake weighing 100,000 pounds, you had to do what we call "brute force."

  • You'd pick a number for H (say, 1).
  • Calculate K (99,999).
  • Check: Is 1 pure? Yes. Is 99,999 pure? No, it's divisible by 3. Discard.
  • Pick H = 2. Check. Discard (divisible by 2).
  • Pick H = 3. Check. Discard (divisible by 3).
  • ...and so on, all the way up to 50,000.

This is like walking through a massive forest, checking every single tree to see if it's an oak. If the forest is huge, this takes forever. The time it takes grows directly with the size of the cake.

The New Way: The Magic Map (The Fast Flight)

Salazar's paper provides a magic map (a closed-form formula). Instead of walking through the forest, you just look at the map, and it instantly tells you exactly how many oak trees are in the forest.

Here is how the magic works, broken down into simple concepts:

1. The "Residue" Filter

The paper realizes that numbers behave in predictable patterns based on their remainders.

  • If you divide any number by 6, the only "pure" remainders (not divisible by 2 or 3) are 1 and 5.
  • So, any valid ingredient H must look like 6 × (some number) + 1 OR 6 × (some number) + 5.

2. The "Special Prime" Gatekeeper

Now we add the third rule: no multiples of p.
The paper introduces two special "gatekeeper" numbers, let's call them a(p) and b(p).

  • Think of a(p) as the specific "forbidden remainder" for ingredients of the 6k + 1 type.
  • Think of b(p) as the "forbidden remainder" for ingredients of the 6k + 5 type.

If your ingredient's "inner number" has a remainder equal to a(p) or b(p) when divided by p, that ingredient is banned.

3. The "Piecewise" Pattern

The most beautiful part of the discovery is that the number of valid pairs doesn't just jump around randomly. It follows a staircase pattern.

  • If you look at cakes of weight 2n where n leaves a remainder of 0 when divided by 3, the number of pairs follows one straight line.
  • If n leaves a remainder of 1, it follows a different straight line.
  • If n leaves a remainder of 2, it follows a third line.

The formula essentially says: "Look at your cake size. Which 'staircase' line does it fall on? Plug the size into that specific line equation, and you get the answer."

Why This Matters

  • Speed: The old way took time proportional to the size of the number (O(n)). If the number was a billion, it took a billion steps. The new way takes a constant amount of time (O(1)), no matter how huge the number is. It's like switching from walking across the country to teleporting.
  • Preparation: The only "work" required is to calculate those two gatekeeper numbers (a(p) and b(p)) once for your chosen prime p. This takes a tiny amount of time (using a standard math trick called the Euclidean algorithm). After that, you can calculate the answer for any cake size instantly.
  • Certainty: The author didn't just guess; they proved the math is perfect and tested it against millions of examples using a computer, and it never made a mistake.

The Analogy Summary

Imagine you are counting how many ways you can build a tower of blocks.

  • The Old Way: You try every possible combination of blocks, one by one, checking if they fit.
  • The New Way: You realize the blocks only fit in specific patterns based on their color and size. You write down a simple rule: "If the tower is this tall, there are exactly X ways to build it." You don't need to build the towers to know the answer; you just do a quick calculation.

This paper gives us that rule for a very specific and tricky type of block tower, turning a slow, tedious counting job into an instant calculation.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →