login
a(n) is the smallest prime p such that Sum_{primes q <= p} Kronecker(-A003657(n),q) > 0, or 0 if no such prime exists.
5

%I #16 Mar 31 2019 03:25:46

%S 608981813029,26861,2,3,5,2,11,3,2,5,2,11,2,11,53,2,13,17,2,3,5,163,3,

%T 2,2,11,5,2,31,31,2,2,3,23,2,41,3,2,13,47,2,5,19,7,11,2,191,2,3,19,2,

%U 15073,3,2,29,5,2,41,109,2,11,2,31,59,3,2,19,2,11,53,2,1019,137

%N a(n) is the smallest prime p such that Sum_{primes q <= p} Kronecker(-A003657(n),q) > 0, or 0 if no such prime exists.

%C Let D be a fundamental discriminant (only the case where D is fundamental is considered because {Kronecker(D,k)} forms a primitive real Dirichlet character with period |D| if and only if D is fundamental), it seems that Sum_{primes q <= p} Kronecker(D,p) <= 0 occurs much more often than its opposite does. This can be seen as a variation of the well-known "Chebyshev's bias". Sequence gives the least prime that violates the inequality when D runs through all negative discriminants.

%C For any D, the primes p such that Kronecker(D,p) = 1 has asymptotic density 1/2 in all the primes, so a(n) should be > 0 for all n.

%C Actually, for most n, a(n) is relatively small compared with A003657(n). There are only 127 n's in [1, 3043] (there are 3043 terms in A003657 below 10000) such that a(n) > A003657(n). The largest terms among the 127 corresponding terms are a(1) = 608981813029 (with A003657(1) = 3), a(1955) = 24996194023 (with A003657(1955) = 6240) and a(847) = 1694759239 (with A003657(847) = 2787).

%H Jianing Song, <a href="/A306500/b306500.txt">Table of n, a(n) for n = 1..3043</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Chebyshev%27s_bias">Chebyshev's bias</a>

%e Let D = -A003657(18) = -52, j(k) = Sum_{primes q <= prime(k)} Kronecker(D,q).

%e For k = 1, Kronecker(-52,2) = 0, so j(1) = 0;

%e For k = 2, Kronecker(-52,3) = -1, so j(2) = -1;

%e For k = 3, Kronecker(-52,5) = -1, so j(3) = -2;

%e For k = 4, Kronecker(-52,7) = +1, so j(4) = -1;

%e For k = 5, Kronecker(-52,11) = +1, so j(5) = 0;

%e For k = 6, Kronecker(-52,13) = 0, so j(6) = 0;

%e For k = 7, Kronecker(-52,17) = +1, so j(7) = 1.

%e The first time for j > 0 occurs at the prime 17, so a(18) = 17.

%o (PARI) b(n) = my(i=0); forprime(p=2,oo,i+=kronecker(n,p); if(i>0, return(p)))

%o print1(608981813029, ", "); for(n=4, 300, if(isfundamental(-n), print1(b(-n), ", ")))

%Y Cf. A003657, A306499 (the positive discriminants case).

%Y The indices of primes are given in A306503.

%K nonn

%O 1,1

%A _Jianing Song_, Feb 19 2019