Skip to content

oceans20737/Collatz-4_Prime_Chain

Repository files navigation

DOI

4-adic Collatz Prime Chains

A research project exploring rare prime number sequences generated by a 4-adic Collatz-like map:

If n ≡ 1 (mod 4):  f(n) = (5n − 1) / 4
If n ≡ 3 (mod 4):  f(n) = (5n + 1) / 4
If n ≡ 0 or 2 (mod 4):  stop

This repository documents the discovery of two length-7 prime chains, found using a modular skipping method.


Overview

While the classical Collatz conjecture explores convergence, certain Collatz-like maps can produce strictly increasing sequences that remain prime for multiple steps.

This project investigates a 4-adic linear transformation that branches based on n mod 4.
By restricting the orbit to primes, we obtain a generalized form of Cunningham chains.

A targeted search using modular constraints enabled efficient discovery of long prime chains.


Discovered Length-7 Chains

The following two 7-term prime chains satisfy
p(i+1) = (5*p(i) ± 1) / 4,
with the sign determined by p(i) mod 4:

Chain 1 (k = 1,247,136):

455847361774092289
569809202217615361
712261502772019201
890326878465024001
1112908598081280001
1391135747601600001
1738919684502000001

Chain 2 (k = 1,529,862):

559188056938807297
698985071173509121
873731338966886401
1092164173708608001
1365205217135760001
1706506521419700001
2133133151774625001

All values were verified prime using deterministic Miller-Rabin testing.


Mathematical Notes

4-adic branching

The function branches based on n mod 4:

  • 1 → (5n − 1)/4
  • 3 → (5n + 1)/4

This ensures integer outputs and introduces a two-path structure not present in classical chains.

Skipping method

To avoid even-number traps and small prime factors, we used a modulus:

M = 4^7 × (3 × 7 × 11 × 13 × 17 × 19 × 23) = 365515358208

Only candidates of the form n₀ = M·k ± 1 were tested, significantly reducing the search space.


Getting Started

Prerequisites

  • Python 3.x
  • sympy for primality testing

Install dependencies:

pip install sympy

Usage

Run the exploration script:

python collatz_4adic_prime_chain_exploration.py

Run the verification script (to check a specific chain):

python collatz_4adic_prime_chain_verification.py

You can modify the chain length or search range as needed.


Repository Contents

  • collatz_4adic_prime_chain_exploration.py — skipping-based exploration script
  • collatz_4adic_prime_chain_verification.py — chain verification script
  • Collatz-4_Prime_Chain_Title.pdf — discovered chains
  • Collatz-4_Prime_Chain_Report_EN.pdf — discovered chains
  • Collatz-4_Prime_Chain_Report_JP.pdf — discovered chains
  • README.txt — project documentation
  • LICENSE — MIT License

Citation

A formal record of this discovery is archived on Zenodo.


License

This project is licensed under the MIT License.
See the LICENSE file for details.


Acknowledgments

Developed by Hiroshi Harada (2026).
Thanks to the open-source Python and SymPy communities.