Efficient Sequential Composite Generation and Prime Inference in Base Prime Notation (BPN)

Step 1: Generate Sequences A and B
Generate the sequences 𝐴 = 6𝑘 − 1 and 𝐵 = 6𝑘 + 1 up to a limit. Let’s choose a limit of 𝑘 = 10 for illustration.

For simplicity in this example, we’ll use values of 𝐴 AND 𝐵, rather than a symmetrical range implementation for |𝐴| OR |𝐵| using absolute values I believe is more efficient and elegant.

k stepA (6k-1)B (6k+1)
0-11
157
21113
31719
42325
52931
63537
74143
84749
95355
105961

Step 2: Identify Primes Using a Sieve-like Method
Primes in 𝐴 and 𝐵 are those numbers that are not divisible by any smaller prime. For simplicity, assume we have already identified primes up to a certain limit:

Prime SequenceNumbersPrimes
A5, 11, 17, 23, 29, 35, 41, 47, 53, 595, 11, 17, 23, 29, 41, 47, 53, 59
B7, 13, 19, 25, 31, 37, 43, 49, 55, 617, 13, 19, 31, 37, 43, 61

Step 3: Initialize Min-Heap for Composite Numbers
We start by squaring the primes and inserting them into a min-heap. This table tracks the current state of the heap.

BPN Index StepNumerical FormInitial CompositeHeap State
155 * 5 = 2525
277 * 7 = 4925, 49
31111 * 11 = 12125, 49, 121
41313 * 13 = 16925, 49, 121, 169
51717 * 17 = 28925, 49, 121, 169, 289
61919 * 19 = 36125, 49, 121, 169, 289, 361

Step 4: Generate and Track Composite Numbers
Here we extract the smallest composite, generate new composites, and update the heap.

Extracted CompositeNew Composites GeneratedUpdated Heap State
25 (5*5)5 * 7 = 35, 5 * 11 = 5535, 49, 121, 169, 289, 361, 55
35 (5*7)5 * 13 = 65, 7 * 7 = 4949, 49, 121, 169, 289, 361, 55, 65
49 (7*7)7 * 11 = 77, 11 * 11 = 12149, 55, 121, 169, 289, 361, 65, 77
55 (5*11)5 * 17 = 85, 11 * 13 = 14365, 77, 121, 143, 169, 289, 361, 85

Step 5: Infer Prime Numbers
Index values that do not produce matching composite values are inferred as primes.

BPN IndexAbsolute ValueCompositePrime?
01NoNo
15NoYes
27NoYes
311NoYes
413NoYes
517NoYes
619NoYes
723NoYes
825YesNo
929NoYes
1031NoYes
1135YesNo
1237NoYes
1341NoYes
1443NoYes
1547NoYes
1649YesNo
1753NoYes
1855YesNo
1959NoYes
2061NoYes

Summary
This table-based method helps to visualize and systematically identify composites within the BPN framework. By using sequences 𝐴 and 𝐵, initializing a heap with prime squares, and tracking generated composites, we can efficiently infer primes based on indices that do not produce composite values.

https://genius.com/Black-moon-i-got-cha-opin-remix-lyrics

Levity

Q: Why did the algorithm developer wonder if he could swap piles for heaps?

A: Because managing those composite elements was a real pain for his backend.