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.
%I A151763 #24 Dec 03 2016 12:12:17 %S A151763 0,0,-1,0,1,0,-1,0,0,0,-1,0,1,0,0,0,1,0,-1,0,0,0,-1,0,0,0,0,0,1,0,-1, %T A151763 0,0,0,0,0,1,0,0,0,1,0,-1,0,0,0,-1,0,0,0,0,0,1,0,0,0,0,0,-1,0,1,0,0,0, %U A151763 0,0,-1,0,0,0,-1,0,1,0,0,0,0,0,-1,0,0,0,-1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,-1,0,0 %N A151763 If n is a prime == 1 mod 4 then a(n) = 1, if n is a prime == 3 mod 4 then a(n) = -1, otherwise a(n) = 0. %C A151763 a(A002145(n)) = -1; a(A065090(n)) = 0; a(A002144(n)) = 1. [_Reinhard Zumkeller_, Oct 06 2011] %H A151763 Reinhard Zumkeller, <a href="/A151763/b151763.txt">Table of n, a(n) for n = 1..10000</a> %H A151763 N. Katz, <a href="http://dx.doi.org/10.1090/S0273-0979-09-01257-9">Lang-Trotter revisited</a>, Bull. Amer. Math. Soc., 46 (2009), 413-457. %F A151763 a(n) = (2 - n mod 4) * A010051(n). %p A151763 a:= proc(n) if n::odd and isprime(n) then 2 - (n mod 4) else 0 fi end proc: %p A151763 seq(a(n),n=1..100); # _Robert Israel_, Aug 22 2014 %t A151763 a[n_] := Which[!PrimeQ[n], 0, m = Mod[n, 4]; m == 1, 1, m == 3, -1, True, 0]; Array[a, 105] (* _Jean-François Alcover_, Dec 03 2016 *) %o A151763 (Haskell) %o A151763 a151763 n | even n = 0 %o A151763 | a010051 n == 1 = 2 - n `mod` 4 %o A151763 | otherwise = 0 %o A151763 -- _Reinhard Zumkeller_, Oct 06 2011 %Y A151763 Cf. A079260, A079261. %Y A151763 Cf. A066520 (partial sums). %K A151763 sign %O A151763 1,1 %A A151763 _N. J. A. Sloane_, Jun 22 2009