OFFSET
1,1
COMMENTS
In general, assuming the strong form of RH, if 0 < a, b < k, gcd(a, k) = gcd(b, k) = 1, a is a quadratic residue and b is a quadratic nonresidue mod n, then Pi(k,b)(n) > Pi(k,a)(n) occurs more often than not, where Pi(k,b)(n) is the number of primes <= n that are congruent to b modulo k. This phenomenon is called "Chebyshev's bias". This sequence gives the indices of the smallest primes q to violate the inequality Sum_{primes r <= q} Kronecker(q,p) <= 0, p = prime(n).
LINKS
Wikipedia, Chebyshev's bias
EXAMPLE
For prime(10) = 29, k = 128 is the first case such that Sum_{i=1..k} Kronecker(prime(i),29) = 1 > 0, so a(10) = 128.
PROG
(PARI) a(n) = if(n==2, 23338590792, if(n==3, 102091236, my(p=prime(n), i=0); forprime(q=2, oo, i+=kronecker(q, p); if(i>0, return(primepi(q))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jianing Song, Nov 08 2019
STATUS
approved