login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 10
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(A002145(n)) = -1; a(A065090(n)) = 0; a(A002144(n)) = 1. [Reinhard Zumkeller, Oct 06 2011]
LINKS
N. Katz, Lang-Trotter revisited, Bull. Amer. Math. Soc., 46 (2009), 413-457.
FORMULA
a(n) = (2 - n mod 4) * A010051(n).
MAPLE
a:= proc(n) if n::odd and isprime(n) then 2 - (n mod 4) else 0 fi end proc:
seq(a(n), n=1..100); # Robert Israel, Aug 22 2014
MATHEMATICA
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 *)
PROG
(Haskell)
a151763 n | even n = 0
| a010051 n == 1 = 2 - n `mod` 4
| otherwise = 0
-- Reinhard Zumkeller, Oct 06 2011
CROSSREFS
Cf. A066520 (partial sums).
Sequence in context: A164292 A337802 A257531 * A353558 A353638 A324908
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Jun 22 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)