Finding a list of Cunningham chains online

326 Views Asked by At

A succession of primes such that $p$, $2p+1$, $2(2p+1)+1$, $\ldots$ is called a Cunningham chain. There are several sites on the internet that show Cunningham chain records, i.e., the smallest prime starting a chain, the longest chain of the first or second kind, and so forth.

However, I am interested in simple lists of Cunningham chains that allow to search for a chain of length $l$, containing a certain prime, $\ldots$

I am certain there is some sort of Cunningham chain database somewhere. Can anyone give such a link?

3

There are 3 best solutions below

0
On BEST ANSWER

All credit goes to user "The Short One" for suggesting this link in the comments.


The following URL contains various lists of Cunningham chains: primefan.tripod.com/CunninghamChains.html:

  • Smallest initial term Cunningham Chain of length $n$,
  • Cunningham Chains of length more than $3$ with initial term less than $1293330$,
  • All Cunningham Chains with initial term less than $104730$.

Moreover, there is the following Mathematica code for generating Cunningham chains:

Cunningham[x_] := Module[{a}, If[Not[PrimeQ[x]], Return[{}]]; chain = {x}; a = 2x + 1; While[PrimeQ[a], chain = {chain, a}; a = 2a + 1]; a = (x - 1)/2; While[PrimeQ[a], chain = {a, chain}; a = (a - 1)/2]; Flatten[chain]]
0
On

The smart-aleck answer would be that Sloane's OEIS is the Cunningham chain database. That's a general purpose reference, so it's easy to get sidetracked.

The Tripod page mentioned in the comments allows a search only if the browser you're viewing it on allows it, which I suppose gets taken for granted.

As far as I can tell, that page hasn't been updated in years, except for the ad delivery software. Of course the numbers shouldn't change if they were correct in the first place, but the link to Sloane's A005602 is broken.

Then I wondered: what might I find on GitHub? There's a Rust program, a C program, and it turns out Cunningham chains have something to do with Bitcoin mining, I'm so disappointed right now...

And the most recent thing I could find on GitHub is an HTML page with JavaScript. It only shows one Cunningham chain at a time, or none if you input a composite number, $-1$, 0, 1 or some non-integer value.

Plus it's very limited by JavaScript, it can really choke on small numbers like 95405042230542329 (small by the frivolous theorem of arithmetic). I suppose an implementation in Java could use BigInteger, allowing you to go farther than that.

So in conclusion, the exact thing you're looking for does not actually exist, but the things that do exist get pretty close to what you want.


On the last link I gave, I noticed that you can enter negative numbers. It's always refreshing to see people not blindly stuck on the idea that negative numbers can't be prime. Longest chain I've found among negative primes so far is of length 3, "starting" with $-19$.

And it got me to wondering about other domains this could be extended to? For instance, in the Gaussian integers: $2(1 + i) + 1 = 3 + 2i$, norm 13, which is prime, or $2(2 + i) + 1 = 5 + 2i$, norm 29, which is prime, and $2(5 + 2i) + 1 = 11 + 4i$, norm 137, which is also prime...

Or maybe it makes more sense to use $1 + i$ instead of 2? It doesn't make much difference to use $i$ instead of 1, on account of the symmetry.

4
On

I made a program that searches for cunningham chains that we use for cryptography protocols at my work that you can use here: https://github.com/mikelodder7/cunningham_chain

It doesn't search for specific primes but you can modify it to do that as needed. This is my code and does not belong to my work or anyone else.