login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A070750 0 if n-th prime is even, 1 if n-th prime is == 1 mod 4, and -1 if n-th prime is == 3 mod 4. 20
0, -1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Also, sin(prime(n)*Pi/2), where prime(n) = A000040(n), Pi=3.1415... (original definition).

Also imaginary part of primes mapped as defined in A076340, A076341: a(n) = A076341(A000040(n)), real part = A076342.

Legendre symbol (-1/prime(n)) for n > 1. - T. D. Noe, Nov 05 2003

For n>1, let p = prime(n) and m = (p-1)/2. Then c(m) - a(n) = 0 mod p, where c(m) = (2*m)!/(m!)^2 = A000984(m) is the central binomial coefficient [Proof: By definition, c(m)*(m!)^2 - (p-1)! = 0 and therefore c(m)*(m!)^2*(-1)^(m+1) - (p-1)!*(-1)^(m+1) = 0. Now apply Wilson's theorem, (p-1)! = 1 mod p, and its corollary, (m!)^2 = (-1)^(m+1) mod p, and finally use the formula by T. D. Noe listed below to replace (-1)^m by a(n).]. Similarly, C_m - 2*a(n) = 0 mod p, with C_m = A000108(m) being the m-th Catalan number [Proof: By definition, C_m*(p+1)*(m!)^2 - 2*(p-1)! = 0. The result follows proceeding as in the first proof.]. - Stanislav Sykora, Aug 11 2014

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Legendre Symbol

Wikipedia, Wilson's theorem

FORMULA

a(n) = 2 - prime(n) mod 4.

a(n) = (-1)^((prime(n)-1)/2) for n > 1. - T. D. Noe, Nov 05 2003

EXAMPLE

p = 4*k+1 (see A002144): a(p) = sin((4*k+1)*Pi/2) = sin(2*k*Pi+Pi/2) = sin(Pi/2) = 1.

p = 4*k+3 (see A002145): a(p) = sin((4*k+3)*Pi/2) = sin(2*k*Pi+3*Pi/2) = sin(3*Pi/2) = -1.

MATHEMATICA

a[n_] := JacobiSymbol[-1, Prime[n]]; a[1] = 0; Table[a[n], {n, 1, 72}] (* Jean-Fran├žois Alcover, Oct 05 2012, after T. D. Noe *)

PROG

(PARI) apply(n->2-n%4, primes(100)) \\ Charles R Greathouse IV, Aug 21 2011

(Haskell)

a070750 = (2 -) . (`mod` 4) . a000040  -- Reinhard Zumkeller, Feb 28 2012

CROSSREFS

Cf. A000040, A070748, A070749, A002144, A002145, A000108, A000984, A134323, A257834, A076340, A076341.

Sequence in context: A011596 A011597 A070747 * A011598 A324672 A011599

Adjacent sequences:  A070747 A070748 A070749 * A070751 A070752 A070753

KEYWORD

sign,nice,easy

AUTHOR

Reinhard Zumkeller, May 04 2002

EXTENSIONS

Changed wording of definition - N. J. A. Sloane, Jun 21 2015.

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 17 14:44 EDT 2019. Contains 325106 sequences. (Running on oeis4.)