

A275939


Consider the prime race mod q (where q >=2) between qn+1 and qn1. Values are where qn+1 first takes lead over qn1.


4




OFFSET

2,1


COMMENTS

Values are available for all 2 <= q <= 999 except for 12 and 24. If q is odd and > 3 then 2*q will have the same value in the sequence as q.
Additional terms starting with q = 12 are:
unknown, 53, 71, 331, 17, 239, 37, 213827, 1381, 673, 23, 47, unknown, 101, 53, 379, 29, 59, 331
The longest qn+1 versus qn1 races up to q = 999 are for q = 3,6,8,12,24 and 168. When q = 168 the race ends at prime 273084304417.
The mod 12 and 24 races were checked by computer to 1.1 * 10^14 without qn+1 ever leading.
Kevin Ford (private communication) provides the following information on these races: "My paper with Richard Hudson contains a lot of information about the location of sign changes for pi(x,q,a)pi(x,q,b). Corollary 4 has rigorous upper bounds, but these will likely not be useful to you. The information in Tables 2 and 3 will be more helpful, as these provide the most likely places to look for the first sign change. In the case of the mod 12 race, it is probably around exp(187.536), or about 2.79 x 10^{81}. For the mod 24 race, it's about exp(43.453)=7.437... x 10^{18}".


REFERENCES

Ford, Kevin; Konyagin, Sergei; Chebyshev's conjecture and the prime number race. IV International Conference "Modern Problems of Number Theory and its Applications": Current Problems, Part II (Russian) (Tula, 2001), 6791.
Paulo Ribenboim, The Little Book of Big Primes, Springer 1991


LINKS

Table of n, a(n) for n=2..11.
Kevin Ford and Richard H. Hudson, Sign changes in pi q,a(x)  pi q,b(x), Acta Arithmetica 100 (2001), 297314.
Kevin Ford and Sergei Konyagin, Chebyshev's conjecture and the prime number race
Andrew Granville and Greg Martin, Prime Number Races, Amer. Math. Monthly, 113 (No. 1, 2006), 133.
Andy Martin, Values for 2 to 999 as far as they are known


EXAMPLE

For the fourth term q is 5. For primes 2,3,5 and 7 the mod 5 values are 2,3,0 and 2 respectively, so there is no change in the race. For the next prime 11, mod 5 gives 1, qn+1 now leads 1 to 0, and the race is over.


PROG

/*
C language program used to investigate prime number races.
Computes the first lead of qn+1 over qn1 for q from 2 to 999.
By Andy Martin oldadit@gmail.com 8/12/2016.
Requires Kim Walisch's primesieve library from http://primesieve.org
Iteration based on the primesieve_iterator.c example.
*/
#include <primesieve.h>
#include <inttypes.h>
#include <stdio.h>
#define UPDATE_COUNT 10000000000ull
void race(uint64_t q)
{
uint64_t prime = 0;
uint64_t m1 = 0;
uint64_t m_1 = 0;
uint64_t rem = 0;
uint64_t update = UPDATE_COUNT;
primesieve_iterator pi;
primesieve_init(&pi);
while (prime = primesieve_next_prime(&pi)) {
if ((rem = prime % q) == 1){
m1 += 1;
} else if (rem == q1) {
m_1 += 1;
}
if (m1 > m_1){
printf("Race mod %3llu ends at %12llu with %11llu pi(x; %llu, 1) and %11llu pi(x; %llu, %llu)\n",
q, prime, m1, q, m_1, q, q1);
break;
}
/* Enable for update on long races where q = 3, 6, 8, 12, 24, 168 */
if (prime > update) {
printf(" Race mod %llu ongoing at prime %llu with m1 %llu and m_1 %llu diff: %llu\n",
q, prime, m1, m_1, m_1  m1);
update += UPDATE_COUNT;
}
}
primesieve_free_iterator(&pi);
}
int main()
{
uint64_t i;
for(i=2; i<1000; i++){ race(i); }
return(0);
}


CROSSREFS

Cf. A007350, A007352.
Sequence in context: A235357 A260002 A058447 * A230810 A266199 A216148
Adjacent sequences: A275936 A275937 A275938 * A275940 A275941 A275942


KEYWORD

nonn,more


AUTHOR

Andy Martin, Aug 12 2016


EXTENSIONS

a(8)a(11) from Andy Martin, Aug 15 2016


STATUS

approved



