[seqfan] Re: A look at prime number gaps using only potential prime numbers

hv at crypt.org hv at crypt.org
Tue Sep 28 05:56:31 CEST 2021


Harry Neel <neelh48 at hotmail.com> wrote:
:Looking at a sieve for all numbers having factors greater than 5 and
:selecting choosing numbers that have factors equal to greater than 7
:it appears that a lists of 'Maximal Gaps' that is based on where
:potential prime locations are not prime numbers.  For example 49 is
:the first potential prime location that is not prime having a prime
:factor of 7.
:
:The preceding prime is 47 and the next number which could be prime is
:53, which is prime. So is there a maximal gap in the potential prime
:locations of 1?

If I understand this correctly, between any pair of consecutive primes
you're counting how many of the intervening composites are coprime with
each of 2, 3 and 5.

:Unless mistakes were made, the gaps below are straight from sieving.
:
:Gap of                 following prime
:1                                               47
:2                                             113
:3                                              317
:4                                              523
:8                                              1327
:9                                              9551
:10                                           15683

On the basis of my understanding above I can confirm those, and offer
some more using the simple perl program below:

gap, prime, next prime
1 47 53
2 113 127
3 317 331
4 523 541
8 1327 1361
9 9551 9587
10 15683 15727
12 19609 19661
13 25471 25523
18 31397 31469
22 155921 156007
24 360653 360749
29 370261 370373
30 1349533 1349651
34 1357201 1357333
38 2010733 2010881
40 4652353 4652507
47 17051707 17051887
55 20831323 20831533
58 47326693 47326913
59 122164747 122164969
61 189695659 189695893
65 191912783 191913031
66 387096133 387096383
74 436273009 436273291
76 1294268491 1294268779
77 1453168141 1453168433
85 2300942549 2300942869

:Only preliminary checks on additional gaps have been preformed and
:Maximal Gap lengths may not be appropriate.  Gaps is the potential
:prime locations for compared to Maximal Primes appear to be:
:
:Gap in                                   following             Maximal               *If using a gap of 1 between 2 or 3
:Potential Prime                 prime                    prime gap*         use higher value.
:Locations
:11                                           360653                  95 or 96
:12                                           370261                  111 or 112
:13                                           1349533                117 or118
:And a few more up through
:67                                           191912783           247 or 248

Sorry, I don't understand what this table represents.

:Is there any validity here?  Worth examination?  Help from someone
:will definitely be needed as I have gone about as far as reasonable
:by doing everything by hand and spreadsheet.

As a sequence, my main question would be what motivates sieving out
multiples of 2, 3 and 5 - why not just 2 and 3, or all of 2, 3, 5 and 7?

:I modified a portion of the sieve I use if anyone is interested.  Also
:have a preliminary comparison between using gaps in the sieve of
:potential prime locations and associated Maximal Prime Gaps.
:
:Thanks for your attention.
:H. Neel

Hugo van der Sanden
---
#!/opt/maths/bin/perl
use strict;
use warnings;
use Math::Prime::Util qw{ next_prime gcd };

my $p = 2;
my $best = 0;
my @coprime = map { (gcd($_, 30) == 1) ? 1 : 0 } 0 .. 29;
while (1) {
    my $np = next_prime($p);
    my $gap = 0;
    for ($p + 1 .. $np - 1) {
        $gap += $coprime[$_ % 30];
    }
    if ($best < $gap) {
        print "$gap $p $np\n";
        $best = $gap;
    }
    $p = $np;
}




More information about the SeqFan mailing list