|
|
A066520
|
|
Number of primes of the form 4m+3 <= n minus number of primes of the form 4m+1 <= n.
|
|
31
|
|
|
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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,11
|
|
COMMENTS
|
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.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
a[n_] := Length[Select[Range[3, n, 4], PrimeQ]]-Length[Select[Range[1, n, 4], PrimeQ]]
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 *)
|
|
PROG
|
(Haskell)
a066520 n = a066520_list !! (n-1)
a066520_list = scanl1 (+) $ map (negate . a151763) [1..]
|
|
CROSSREFS
|
Let d be a fundamental discriminant.
|
|
KEYWORD
|
|
|
AUTHOR
|
Sharon Sela (sharonsela(AT)hotmail.com), Jan 05 2002
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|