# Optimal Mersenne Primes Search Using Modular Groups

**URL:** <https://forum.crystal-lang.org/t/optimal-mersenne-primes-search-using-modular-groups/9207>\
**Category:** Offtopic\
**Created:** [October 11, 2026, 7:46pm UTC](https://forum.crystal-lang.org/t/optimal-mersenne-primes-search-using-modular-groups/9207 "2026-10-11T19:46:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kojix2](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/kojix2/32/1583_2.png) [@kojix2](https://forum.crystal-lang.org/u/kojix2)\
**Post date:** [October 12, 2026, 2:02am UTC](https://forum.crystal-lang.org/t/optimal-mersenne-primes-search-using-modular-groups/9207/2 "2026-10-12T02:02:37Z")

</div>

I realize you probably don’t want this, but it’s still better than no one replying at all.  
So, I’m acting as [a meat proxy](https://gruhn.me/blog/2026-08-03/) 🍖 here and posting the results of ChatGPT’s review so that visitors to this page can read them.

> ### Claims of the paper
> 
> - The paper proposes generating Mersenne prime candidates using the exponent `m` of a known Mersenne prime, updating `m` whenever a new one is found.
> - It claims that avoiding prime exponent enumeration and reducing candidate density makes the method faster than GIMPS.
> 
> ### Algebraic relationship
> 
> - The formula is `G_m(k) = 2^m * (3k+1) - 1`. For odd `m` and odd `q > m`, `G_m(k) = 2^q-1` requires `k = (2^(q-m)-1)/3`.
> - [OEIS A002450](https://oeis.org/A002450) gives `a_j = (4^j-1)/3` (`j >= 1`), producing `1,5,21,85,...`.
> - Since `G_m(a_j) = 2^(m+2j)-1`, this is equivalent to enumerating odd exponents `m+2,m+4,...`. The identity also holds for composite Mersenne numbers and does not establish primality.
> 
> ### Prior work
> 
> - For `m = 3`, the values of `k` producing Mersenne primes through `24k+7` appear in [OEIS A124477](https://oeis.org/A124477) (Artur Jasinski, 2006), matching the paper’s table.
> - The general formula and the procedure for updating `m` also appear in the [author’s earlier paper](https://vixra.org/pdf/2006.0054v1.pdf) (revised 2019, published 2020).
> 
> ### Computational complexity
> 
> - The paper’s `k += 2` implementation requires `(2^(q-m)+2)/6` iterations to reach exponent `q`, growing exponentially with `q-m`.
> - From `m = 31` to `q = 61`, this requires **178,956,971 iterations** , compared with only **7 prime exponents** in the same range.
> - The [author’s 2024 implementation](https://forum.crystal-lang.org/t/optimized-mersenne-prime-search/7371) uses `k_next = 4*k+1`, reducing this to 15 iterations, or 7 candidates requiring primality testing after filtering prime exponents.
> - Direct enumeration of prime exponents produces the same 7 candidates. [GIMPS](https://www.mersenne.org/various/works.php) additionally uses factorization methods, PRP tests, and Lucas–Lehmer tests.
> - Therefore, reducing candidate density among all integers does not, by itself, demonstrate a computational advantage over existing methods.

I don’t understand any of the mathematical content. I simply invested in tokens and managed the direction of the answers through chat 🫠

---

_[View the full topic](https://forum.crystal-lang.org/t/optimal-mersenne-primes-search-using-modular-groups/9207)._
