# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a066520 Showing 1-1 of 1 %I A066520 #31 Oct 22 2021 12:48:09 %S A066520 0,0,1,1,0,0,1,1,1,1,2,2,1,1,1,1,0,0,1,1,1,1,2,2,2,2,2,2,1,1,2,2,2,2, %T A066520 2,2,1,1,1,1,0,0,1,1,1,1,2,2,2,2,2,2,1,1,1,1,1,1,2,2,1,1,1,1,1,1,2,2, %U A066520 2,2,3,3,2,2,2,2,2,2,3,3,3,3,4,4,4,4,4,4,3,3,3,3,3,3,3,3,2,2,2,2,1,1,2 %N A066520 Number of primes of the form 4m+3 <= n minus number of primes of the form 4m+1 <= n. %C A066520 Although the initial terms are nonnegative, it has been proved that infinitely many terms are negative. The first two are a(26861)=a(26862)=-1. Next there are 3404 values of n in the range 616841 to 633798 with a(n)<0. Then 27218 values in the range 12306137 to 12382326. %C A066520 Partial sums of A151763. - _Reinhard Zumkeller_, Feb 06 2014 %H A066520 T. D. Noe, Table of n, a(n) for n=1..30000 (enough terms to show the first dip into negative territory) %H A066520 Carter Bays and Richard H. Hudson, Zeros of Dirichlet L-Functions and Irregularities in the Distribution of Primes, Mathematics of Computation, 69 (2000) 861-866. %H A066520 A. Granville and G. Martin, Prime number races, arXiv:math/0408319 [math.NT], 2004. %F A066520 a(n) = A066490(n) - A066339(n). %F A066520 a(2*n+1) = a(2*n+2) = -A156749(n). - _Jonathan Sondow_, May 17 2013 %t A066520 a[n_] := Length[Select[Range[3, n, 4], PrimeQ]]-Length[Select[Range[1, n, 4], PrimeQ]] %t A066520 f[n_]:=Module[{c=Mod[n,4]},Which[!PrimeQ[n],0,c==3,1,c==1,-1]]; Join[{0,0}, Accumulate[Array[f,110,3]]] (* _Harvey P. Dale_, Mar 03 2013 *) %o A066520 (Haskell) %o A066520 a066520 n = a066520_list !! (n-1) %o A066520 a066520_list = scanl1 (+) $ map (negate . a151763) [1..] %o A066520 -- _Reinhard Zumkeller_, Feb 06 2014 %Y A066520 Cf. A066339, A066490, A007350, A051024, A051025. %Y A066520 Cf. A156749 Sequence showing Chebyshev bias in prime races (mod 4). [From _Daniel Forgues_, Mar 26 2009] %Y A066520 Let d be a fundamental discriminant. %Y A066520 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), this sequence (d=-4), A321856 (d=-3), A321857 (d=5), A071838 (d=8), A321858 (d=12). %Y A066520 Sequences of the form "a(n) = -Sum_{i=1..n} Kronecker(d,prime(i))" with |d| <= 12: A321865 (d=-11), A320858 (d=-8), A321864 (d=-7), A038698 (d=-4), A112632 (d=-3), A321862 (d=5), A321861 (d=8), A321863 (d=12). %K A066520 sign,easy,nice,look %O A066520 1,11 %A A066520 Sharon Sela (sharonsela(AT)hotmail.com), Jan 05 2002 %E A066520 Edited by _Dean Hickerson_, Mar 05 2002 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE