This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A306499 #36 Mar 24 2020 17:09:37 %S A306499 2,2082927221,11100143,61463,2083,2,1217,5,3,719,2,11,3,2,7,17,11,2,7, %T A306499 5,2,13,2,3,23,7,3,2,13,19,2,23,17,2,5,2,7,3,2,13,3,2,19,7,2,31,31,5, %U A306499 17,2,13,13,3,47,2,5,3,2,37,2,47,2,5,7,2,43,2,3,11,5,3,2,29 %N A306499 a(n) is the smallest prime p such that Sum_{primes q <= p} Kronecker(A003658(n),q) > 0, or 0 if no such prime exists. %C A306499 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 positive discriminants. %C A306499 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 A306499 Actually, for most n, a(n) is relatively small compared with A003658(n). There are only 52 n's in [1, 3044] (there are 3044 terms in A003658 below 10000) such that a(n) > A003658(n). The largest terms among the 52 corresponding terms are a(2) = 2082927221 (with A003658(2) = 5), a(2193) = 718010179 (with A003658(2193) = 7213) and a(3) = 11100143 (with A003658(3) = 8). %H A306499 Jianing Song, <a href="/A306499/b306499.txt">Table of n, a(n) for n = 1..3044</a> %H A306499 Wikipedia, <a href="https://en.wikipedia.org/wiki/Chebyshev%27s_bias">Chebyshev's bias</a> %F A306499 a(n) = 2 if A003658(n) == 1 (mod 8); %F A306499 a(n) = 3 if A003658(n) == 28, 40 (mod 48); %F A306499 a(n) = 5 if A003658(n) == 24, 61, 109, 156, 181, 204, 216, 229 (mod 240). %e A306499 Let D = A003658(16) = 53, j(k) = Sum_{primes q <= prime(k)} Kronecker(D,q). %e A306499 For k = 1, Kronecker(53,2) = -1, so j(1) = -1; %e A306499 For k = 2, Kronecker(53,3) = -1, so j(2) = -2; %e A306499 For k = 3, Kronecker(53,5) = -1, so j(3) = -3; %e A306499 For k = 4, Kronecker(53,7) = +1, so j(4) = -2; %e A306499 For k = 5, Kronecker(53,11) = +1, so j(5) = -1; %e A306499 For k = 6, Kronecker(53,13) = +1, so j(6) = 0; %e A306499 For k = 7, Kronecker(53,17) = +1, so j(7) = 1. %e A306499 The first time for j > 0 occurs at the prime 17, so a(16) = 17. %o A306499 (PARI) b(n) = my(i=0); forprime(p=2,oo,i+=kronecker(n,p); if(i>0, return(p))) %o A306499 for(n=1, 300, if(isfundamental(n), print1(b(n), ", "))) %o A306499 (Sage) %o A306499 def KroneckerSum(): %o A306499 yield 2 %o A306499 ind = 0 %o A306499 while True: %o A306499 ind += 1 %o A306499 while not is_fundamental_discriminant(ind): %o A306499 ind += 1 %o A306499 s, p = 0, 1 %o A306499 while s < 1: %o A306499 p = p.next_prime() %o A306499 s += kronecker(ind, p) %o A306499 yield p %o A306499 A306499 = KroneckerSum() %o A306499 print([next(A306499) for _ in range(71)]) # _Peter Luschny_, Feb 26 2019 %Y A306499 Cf. A003658, A306500 (the negative discriminants case). %Y A306499 The indices of primes are given in A306502. %K A306499 nonn %O A306499 1,1 %A A306499 _Jianing Song_, Feb 19 2019