This article introduces a specific way of thinking about prime numbers and twin prime pairs using step-by-step filtering methods, like using a sieve. We call this the "Computational Prime Number Framework".
Our goal is to show how defining primes based on these filtering processes leads to interesting conclusions, particularly about whether these types of primes go on forever.
Important Note: This framework uses its own specific rules and definitions. The results we discuss are based only on these rules. This isn't intended as a proof using standard mathematical methods but rather as an exploration of ideas based on computational processes. More detailed explanations and rigorous arguments are available in further readings (Levels 2 and 3).
The Basic Filter: A "Sieve"
Imagine a tool that filters lists of numbers. You give it:
- A "block list" (e.g.,
[2, 3]
). - A list of numbers to check (e.g.,
[2, 3, 4, ..., 20]
).
The tool removes any number from the check list if it's a multiple of any number in the block list.
# This function acts as our number filter or "sieve"
def sieve(block_list, numbers_to_check):
"""Keeps numbers that are NOT multiples of anything in block_list."""
survivors = []
for num in numbers_to_check:
is_multiple = False
for blocker in block_list:
if blocker != 0 and num % blocker == 0: # Check divisibility
is_multiple = True
break
if not is_multiple:
survivors.append(num) # Keep numbers that survived
return survivors
# Example 1: Block multiples of 2
print(f"Sieving with [2]: {sieve([2], list(range(2, 15)))}")
# Output: Sieving with [2]: [3, 5, 7, 9, 11, 13]
# Example 2: Block multiples of 2 OR 3
print(f"Sieving with [2, 3]: {sieve([2, 3], list(range(2, 15)))}")
# Output: Sieving with [2, 3]: [5, 7, 11, 13]
Finding Primes by Repeating the Filter ("Sifting")
We can find prime numbers by using this sieve repeatedly:
- Start with an empty block list
[]
and numbers[2, 3, 4, ...]
. - Filter the list. Smallest survivor is 2. Add 2 to the block list
[2]
. - Filter the remaining numbers with
[2]
. Smallest survivor is 3. Add 3 to the block list[2, 3]
. - Filter the remaining numbers with
[2, 3]
. Smallest survivor is 5. Add 5 to the block list[2, 3, 5]
. - Keep repeating this: filter, take the smallest survivor, add it to the block list.
# This function performs the step-by-step prime finding
def recursive_sifting(block_list, numbers_to_check):
"""Finds primes by repeating the sieve process."""
survivors = sieve(block_list, numbers_to_check)
if not survivors:
return [] # Stop if no numbers left
next_prime = survivors[0] # The smallest survivor is the next prime
# Continue the process with the rest of the survivors
remaining_primes = recursive_sifting(block_list + [next_prime], survivors[1:])
return [next_prime] + remaining_primes
# Example: Find primes up to 50
print(f"Found primes up to 50: {recursive_sifting([], list(range(2, 50)))}")
# Output: Found primes up to 50: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
This step-by-step "sifting" process generates the familiar sequence of prime numbers.
Why This Prime-Finding Process Never Stops
A key result, similar to Euclid's ancient proof, applies here: this sifting process for primes never has to end.
Why? Because no matter how many primes you've found and put in your block list, there's a proven method (explained in more detail in further readings) to construct a number that is guaranteed to survive the next filtering step. Since a survivor can always be found, the process can always continue to find the next prime.
Conclusion within the framework: This prime-generating process continues infinitely.
Finding Twin Primes with a Special Filter
Twin primes are prime pairs separated by 2, like (5, 7) or (11, 13). We can devise a similar step-by-step filtering process for them.
- Potential twin primes (except 3, 5) come in pairs like
(6n - 1, 6n + 1)
, wheren
is an index number (1, 2, 3,...).- n=1 gives (5, 7)
- n=2 gives (11, 13)
- n=3 gives (17, 19)
- We create a "twin sieve" that filters the indices
n
. - This twin sieve uses blocker numbers derived from the pairs corresponding to previously found indices
p
(specifically, numbers like6p-1
and6p+1
). - It keeps an index
n
only if neither number in its pair(6n-1, 6n+1)
is divisible by any of the blocker numbers.
# The special filter for twin prime indices
def twin_sieve(found_indices, indices_to_filter):
"""Filters indices n based on twin prime rules."""
if not found_indices: return indices_to_filter
last_found_index = found_indices[-1]
# Create block list from numbers 6p-1 and 6p+1 using found indices p
block_list = set() # Use a set for efficiency
for p in range(1, last_found_index + 1):
num1 = 6*p - 1
num2 = 6*p + 1
if num1 > 1: block_list.add(num1)
if num2 > 1: block_list.add(num2)
if not block_list: return indices_to_filter
surviving_indices = []
for n in indices_to_filter:
pair_num1 = 6*n - 1
pair_num2 = 6*n + 1
is_blocked = False
# Check the pair (6n-1, 6n+1) against all blockers
for blocker in block_list:
if blocker != 0 and (pair_num1 % blocker == 0 or pair_num2 % blocker == 0):
is_blocked = True
break
if not is_blocked:
surviving_indices.append(n)
return surviving_indices
# The step-by-step process for twin prime indices
def twin_recursive_sifting(found_indices, indices_to_filter):
"""Finds twin prime indices step-by-step."""
survivors = twin_sieve(found_indices, indices_to_filter)
if not survivors:
return []
next_index = survivors[0]
remaining_indices = twin_recursive_sifting(found_indices + [next_index], survivors[1:])
return [next_index] + remaining_indices
# Helper to see the actual pairs
def generate_pairs_from_indices(indices):
"""Turns indices n back into pairs (6n-1, 6n+1)"""
return [(6*n-1, 6*n+1) for n in indices]
# Example: Find twin prime indices up to n=50 (conceptually starts with index 1)
indices = list(range(1, 50))
found_twin_indices = twin_recursive_sifting([1], indices[1:]) # Start process after index 1
all_found_indices = [1] + found_twin_indices # Add index 1 back
print(f"Found twin indices: {all_found_indices}")
print(f"Corresponding pairs: {generate_pairs_from_indices(all_found_indices)}")
# Output will show indices like [1, 2, 3, 5, 7...] and pairs like [(5, 7), (11, 13), ...]
This "twin sifting" process finds pairs that behave like twin primes according to our framework's rules.
Why This Twin Prime Process Also Never Stops
Similar to the process for single primes, this step-by-step process for finding twin prime indices (and thus pairs) also never has to end.
The reasoning is analogous: no matter how many twin prime indices have been found, there's a method (detailed in further readings) to construct a new index n
whose pair (6n-1, 6n+1)
is guaranteed to survive the twin sieve's filtering step. Since a survivor can always be found, the twin sifting process can always continue to find the next twin prime index.
Conclusion within the framework: This twin-prime-generating process continues infinitely. Furthermore (as shown in detailed proofs), the pairs generated correspond exactly to conventional twin primes (except 3,5).
Summary
This framework defines primes and twin primes based on specific, repeatable filtering processes ("sieves").
- The process for single primes matches known primes and demonstrably never stops.
- The process for twin primes identifies pairs matching known twin primes and also demonstrably never stops within this framework's logic.
These results follow logically from the way the filtering processes are defined. While this approach is different from standard mathematics, it provides a computational perspective suggesting the infinite nature of both primes and twin primes. For the rigorous mathematical details behind the "always find a survivor" claims, please consult the more advanced levels of this documentation.
Simplified Q&A
- What's a sieve in this context?
- It's a defined process (like a function) that filters a list of numbers, removing multiples of numbers from a "block list".
- How does this framework find primes?
- By repeatedly using the sieve: filter numbers, take the smallest survivor, add it to the block list, and repeat. This finds standard primes.
- How does it find twin primes?
- Using a similar repeat-filtering process ("twin sieve"), but it works on indices
n
that represent pairs(6n-1, 6n+1)
, filtering them based on previous results.
- Using a similar repeat-filtering process ("twin sieve"), but it works on indices
- Does this process ever stop?
- No. The core argument (detailed elsewhere) is that you can always construct a number (or an index for a pair) that will survive the next filtering step, so both processes continue infinitely.
- Are the results the same as normal primes and twin primes?
- Yes, the step-by-step processes generate numbers and pairs that match the conventional definitions of primes and twin primes (except the pair (3,5) for twins).
- Is this a standard mathematical proof?
- No, it's a proof based only on the specific rules and definitions of this "Computational Prime Number Framework". It's an alternative way to explore the ideas.
Further Reading
All Three Levels of Proof: https://gist.github.com/kino6052/89114a5110f834c4faf4549a59a9dc5d
Top comments (0)