A321858 a(n) = Pi(12,5)(n) + Pi(12,7)(n) - Pi(12,1)(n) - Pi(12,11)(n) where Pi(a,b)(x) denotes the number of primes in the arithmetic progression a*k + b less than or equal to x.
0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 1, 1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1
Offset: 1
Keywords
Examples
Pi(12,1)(100) = 5, Pi(12,5)(100) = Pi(12,7)(100) = Pi(12,11)(100) = 6, so a(100) = 6 + 6 - 5 - 6 = 1.
Links
- Andrew Granville and Greg Martin, Prime number races, Amer. Math. Monthly, 113 (No. 1, 2006), 1-33.
- Wikipedia, Chebyshev's bias
Crossrefs
Programs
-
PARI
a(n) = -sum(i=1, n, isprime(i)*kronecker(12, i))
Formula
a(n) = -Sum_{primes p<=n} Kronecker(12,p) = -Sum_{primes p<=n} A110161(p).
Comments