MODEXACT ARITHMETIC / NUMBER THEORY

METHOD1 / GENERALIZED

Find your prime basis.

Start with a difference. Follow the construction. Collect verified primes.

Build from a fixed lower input
Inspect one admissible pair
Exact integers. Verified primes.

The construction, and what is generalized
  1. Choose admissible inputs. The inputs are positive integers. The larger exceeds the smaller by a prime difference. In “Build a set”, the lower input stays fixed while we try every prime difference up to the chosen ceiling.
  2. Keep method1’s construction. Increase each integer from the smaller input through the larger by one and add them, including both endpoints. Double that sum, divide by the larger input, and consider its nonnegative square root.
  3. Generalize the selection. If the floor of the root is prime, select it. Otherwise, search upward from the floor and select the first prime. Each candidate is checked exactly. A search may require a larger adjustment than the original method allowed.
  4. Collect distinct outputs. Repeated prime outputs appear only once in the basis. The witness table shows an input pair for each output and, for a set, how many tested pairs produced it.

This agrees with the documented method1 for prime differences two, three, five, seven and eleven. Above that range, primality testing and the upward search are the extension; the original rounding theorem alone does not establish primality.

“Prime basis” means the distinct verified outputs of this run. It does not assert that every prime occurs. The finite set generates, by multiplication, the positive integers whose prime factors are all in that set.

Limits: inputs up to 1,000,000,000, and a difference ceiling up to 100,000 for a set. The lower input plus the ceiling must stay within the input limit. This finder requires 64-bit PHP and no additional extensions.