OFFSET
1,4
COMMENTS
Among the first 10000 terms there are only 291 negative ones, with the earliest one being a(6181) = -1. See the comments about "Chebyshev's bias" in A321858.
LINKS
Wikipedia, Chebyshev's bias
FORMULA
a(n) = -Sum_{primes p<=n} Kronecker(12,prime(i)) = -Sum_{i=1..n} A110161(prime(i)).
EXAMPLE
prime(25) = 97, Pi(12,1)(97) = 5, Pi(12,5)(97) = Pi(12,7)(97) = Pi(12,11)(97) = 6, so a(25) = 6 + 6 - 5 - 6 = 1.
PROG
(PARI) a(n) = -sum(i=1, n, kronecker(12, prime(i)))
CROSSREFS
Cf. A110161.
Let d be a fundamental discriminant.
Sequences of the form "a(n) = -Sum_{primes p<=n} Kronecker(d,p)" with |d| <= 12: A321860 (d=-11), A320857 (d=-8), A321859 (d=-7), A066520 (d=-4), A321856 (d=-3), A321857 (d=5), A071838 (d=8), A321858 (d=12).
KEYWORD
sign
AUTHOR
Jianing Song, Nov 20 2018
STATUS
approved