cp's OEIS Frontend

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.

Showing 1-4 of 4 results.

A306503 a(n) is the index in primes of A306500(n), or 0 if A306500(n) = 0.

Original entry on oeis.org

23338590792, 2946, 1, 2, 3, 1, 5, 2, 1, 3, 1, 5, 1, 5, 16, 1, 6, 7, 1, 2, 3, 38, 2, 1, 1, 5, 3, 1, 11, 11, 1, 1, 2, 9, 1, 13, 2, 1, 6, 15, 1, 3, 8, 4, 5, 1, 43, 1, 2, 8, 1, 1760, 2, 1, 10, 3, 1, 13, 29, 1, 5, 1, 11, 17, 2, 1, 8, 1, 5, 16, 1, 171, 33, 1, 4, 1, 2, 3
Offset: 1

Views

Author

Jianing Song, Feb 19 2019

Keywords

Comments

a(n) is the smallest integer k such that Sum_{i=1..k} Kronecker(-A003657(n),prime(i)) > 0, or 0 if no such k exists.
See A306500 for the actual primes.

Examples

			See A306500 for the example that shows a(18) = 7.
		

Crossrefs

Programs

  • PARI
    b(n) = my(i=0); forprime(p=2, oo, i+=kronecker(n, p); if(i>0, return(p)))
    print1(23338590792, ", "); for(n=4, 300, if(isfundamental(-n), print1(primepi(b(-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.

Original entry on oeis.org

2, 2082927221, 11100143, 61463, 2083, 2, 1217, 5, 3, 719, 2, 11, 3, 2, 7, 17, 11, 2, 7, 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, 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
Offset: 1

Views

Author

Jianing Song, Feb 19 2019

Keywords

Comments

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.
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.
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).

Examples

			Let D = A003658(16) = 53, j(k) = Sum_{primes q <= prime(k)} Kronecker(D,q).
For k = 1, Kronecker(53,2) = -1, so j(1) = -1;
For k = 2, Kronecker(53,3) = -1, so j(2) = -2;
For k = 3, Kronecker(53,5) = -1, so j(3) = -3;
For k = 4, Kronecker(53,7) = +1, so j(4) = -2;
For k = 5, Kronecker(53,11) = +1, so j(5) = -1;
For k = 6, Kronecker(53,13) = +1, so j(6) = 0;
For k = 7, Kronecker(53,17) = +1, so j(7) = 1.
The first time for j > 0 occurs at the prime 17, so a(16) = 17.
		

Crossrefs

Cf. A003658, A306500 (the negative discriminants case).
The indices of primes are given in A306502.

Programs

  • PARI
    b(n) = my(i=0); forprime(p=2,oo,i+=kronecker(n,p); if(i>0, return(p)))
    for(n=1, 300, if(isfundamental(n), print1(b(n), ", ")))
    
  • Sage
    def KroneckerSum():
        yield 2
        ind = 0
        while True:
            ind += 1
            while not is_fundamental_discriminant(ind):
                ind += 1
            s, p = 0, 1
            while s < 1:
                p = p.next_prime()
                s += kronecker(ind, p)
            yield p
    A306499 = KroneckerSum()
    print([next(A306499) for  in range(71)]) # _Peter Luschny, Feb 26 2019

Formula

a(n) = 2 if A003658(n) == 1 (mod 8);
a(n) = 3 if A003658(n) == 28, 40 (mod 48);
a(n) = 5 if A003658(n) == 24, 61, 109, 156, 181, 204, 216, 229 (mod 240).

A329224 a(n) is the smallest prime q such that Sum_{primes r <= q} Kronecker(r,prime(n)) > 0 (or equivalently, Sum_{primes r <= q} Kronecker(r,prime(n)) = 1), or 0 if no such prime exists.

Original entry on oeis.org

11100143, 608981813029, 2082927221, 2, 5, 2083, 2, 11, 2, 719, 2, 11, 2, 53, 2, 17, 5, 5, 163, 2, 2, 2, 11, 2, 2, 23, 2, 23, 5, 2, 2, 5, 2, 11, 31, 2, 17, 15073, 2, 47, 5, 5, 2, 2, 47, 2, 59, 2, 11, 5, 2, 2, 2, 5, 2, 2, 47, 2, 23, 2, 97, 349, 103, 2, 2, 67, 149, 2, 67
Offset: 1

Views

Author

Jianing Song, Nov 08 2019

Keywords

Comments

In general, assuming the strong form of the Riemann Hypothesis, if 0 < a, b < k, gcd(a, k) = gcd(b, k) = 1, a is a quadratic residue and b is a quadratic nonresidue mod k, 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". (See Wikipedia link and especially the links in A007350.) [Edited by Peter Munn, Jun 26 2025]
This sequence gives the smallest primes q to violate the inequality Sum_{primes r <= q} Kronecker(r,p) <= 0, for p = prime(n).

Examples

			For prime(6) = 13, q = 2083 is the first case such that Sum_{primes r <= q} Kronecker(r,13) = 1 > 0, so a(6) = 2083.
		

Crossrefs

Cf. A007350, A306499, A306500, A329225 (indices of these primes).

Programs

  • PARI
    a(n) = if(n==2, 608981813029, if(n==3, 2082927221, my(p=prime(n), i=0); forprime(q=2, oo, i+=kronecker(q, p); if(i>0, return(q)))))

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

Original entry on oeis.org

2, 11100143, 61981, 3, 2082927221, 5, 2, 11100143, 2, 3, 577, 61463, 2083, 11, 2, 3, 2, 11100121, 5, 2082927199, 1217, 3, 2, 5, 2, 17, 61981, 3, 719, 7, 2, 11100143, 2, 3, 23, 5, 11, 31, 2, 3, 2, 13, 17, 7, 2082927199, 3, 2, 61463, 2, 11100121, 7, 3, 17, 5, 2, 11, 2, 3, 31, 7, 5, 41, 2, 3
Offset: 1

Views

Author

Richard N. Smith, Jul 15 2019

Keywords

Crossrefs

Programs

  • PARI
    a(n) = my(i=0); forprime(p=2, oo, i+=kronecker(n, p); if(i>0, return(p))) \\ after Jianing Song in A306499

Formula

a(A003658(n)) = A306499(n).
a(n) = 2 iff n == 1 or 7 mod 8 (see A047522).
a(n) = 3 iff n == 4 mod 6 (see A016957).
Showing 1-4 of 4 results.