login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A092937 Differences nextprime(2k) - precprime(2k) having maximum prime density for 2k <= 10^n. 0

%I #18 Sep 19 2020 18:26:17

%S 6,6,6,6,12,18,18,30

%N Differences nextprime(2k) - precprime(2k) having maximum prime density for 2k <= 10^n.

%C The density of primes occurring with these numbers A060267(2k) appears to max out at higher and higher values of 6x. For example, looking at numbers in the sequence for next and prec prime differences <= 50, we have the following table for n-th powers of 10.

%C k| max| density

%C 2| 6 | 21

%C 3| 6 | 132

%C 4| 6 | 897

%C 5| 6 | 5820

%C 6| 12 | 48030

%C 7| 18 | 394659

%C 8| 18 | 3462648

%C 9| 30 | 32669865

%C Conjecture: The maximum density occurs at increasing multiples of 6 as the number of primes tested approaches infinity. E.g. the number of nextprime - precprime occurrences for 2k <= 10^10 will be 30 or higher. This appears as a plausable statement since as 2k increases, the probability that the difference between the next and preceding prime will contain larger and larger prime factors.

%e For n = 3, we have the difference between nextprime and precprime for 2k <= 10^3:

%e 2k | occurrences

%e -----------------

%e 2 | 35

%e 4 | 80

%e 6 | 132

%e 8 | 60

%e 10 | 80

%e 12 | 44

%e 14 | 49

%e 16 | 0

%e 18 | 9

%e 20 | 10

%e 6 occurs 132 times in the differences for 2k <= 10^3. Thus 6 has the maximum number of occurrences and is the second entry in the table. So a(3) = 6.

%o (PARI) prmppr(n) = { mx=0; f = vector(floor(sqrt(n)+2)); forstep(x=4,n,2,y=nextprime(x)-precprime(x); print1(y","); if(y>mx,mx=y); f[y]++; ); print(); mx2=0; forstep(x=2,mx,2, if(f[x] > mx2,mx2=f[x];d=x); print(x","f[x]); ); print(d","mx2) } \\ use prmppr(1000) to get a(3)=6

%o (PARI) f(n) = nextprime(2*n+1) - precprime(2*n-1); \\ A060267

%o a(n) = {my(v=vector(10^n/2-1, k, f(k+1))); my(nbm = 0, imax = 0); forstep (i=vecmin(v), vecmax(v), 2, my(nb = #select(x->(x==i), v)); if (nb > nbm, nbm = nb; imax = i);); imax;} \\ _Michel Marcus_, Sep 16 2020

%Y Cf. A060267.

%K nonn,more

%O 2,1

%A _Cino Hilliard_, Apr 18 2004

%E Edited by _Michel Marcus_, Sep 16 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)