Wednesday 17 October 2018

Semiprime Chains

Today I turned 25399 days old. This number is a semiprime, meaning that it has two prime factors. In the case of 25399, the prime factors are 11 and 2309. However, the number is a member of OEIS A177216: numbers n that are the product of two distinct primes such that \(2n-1, 4n-3, 8n-7, 16n-15, 32n-31, 64n-63 \text{ and } 128n-127\) are also products of two distinct primes. Below is a screenshot of the mathematical tweet to celebrate the occasion.


Evaluating this leads to the following table:


The chain is thus of the form \(2^a \times n- (2^a-1) \) with the integer \(a \geq 0 \).

The initial members of OEIS A177216 are:
11293, 12139, 25399, 31261, 36199, 44869, 49471, 62521, 72397, 83086, 89737, 91705, 98941, 124846, 125041, 134023, 138994, 144793, 164041, 166171, 170431, 173311, 182527, 199543, 224962, 244294, 258169, 259891, 263086, 275281, 277987 
I was interested to see how many of these terms would survive an extension of the process to \(256 \times n - 255 \), \(512 \times n - 511 \), \(1024 \times n - 1023 \) etc.

Extending the process in the same range to \(256 \times n - 255 \) leads to a considerable thinning of the numbers:
31261 36199 44869 49471 62521 72397 83086 138994 173311 182527 224962 259891 277987
Extending the range to \(512 \times n - 511 \) gives:
31261 36199 138994 173311 259891
Extending the range to \(1024 \times n - 1023 \) gives: 173311

So 173311 is the last man standing. Will it stand any further? As it turns out it will. It holds up to \(2048 \times n - 2047 \) but, at \(4096 \times n - 4095 \), there are three prime factors (419, 601 and 2819) and not two. For \(4096 \times n - 4095 \) to hold, we need to extend the range and this leads to 2212801). Below I've listed the semiprime chain associated with the number 173311.


173311 also has the property that is formed by a concatenation of two primes 173 and 311.

The following SAGE code shows that 2212801 is the only number up to 10 million with a prime chain up to \(4096 \times n - 4095 \):

INPUT

for n in range(1,10000000):
    if len(list(divisors(n)))==4:
        if len(list(divisors(2*n-1)))==4:
            if len(list(divisors(4*n-3)))==4:
                if len(list(divisors(8*n-7)))==4:
                    if len(list(divisors(16*n-15)))==4:
                        if len(list(divisors(32*n-31)))==4:
                            if len(list(divisors(64*n-63)))==4:
                                if len(list(divisors(128*n-127)))==4:
                                    if len(list(divisors(256*n-255)))==4:
                                        if len(list(divisors(512*n-511)))==4:
                                            if len(list(divisors(1024*n-1023)))==4:
                                                if len(list(divisors(2048*n-2047)))==4:
                                                    if len(list(divisors(4096*n-4095)))==4:
                                                        print(n),
OUTPUT

2212801

You can try running the above SAGE code using the evaluate button below the SAGE cell. Sometimes it's a little slow but generally it should work. You can modify the code by adding a # in front of a line e.g. # if len(list(divisors(4096*n-4095)))==4: will remove the 4096 condition and apply only the 2048 and lower conditions. Try it out. You may need to refresh the page after each evaluation.

No comments:

Post a Comment