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!)
A077008 Legendre symbol (-1,p) where p is the n-th prime. 0

%I #17 Apr 21 2016 08:38:52

%S -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,

%T 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,

%U -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

%N Legendre symbol (-1,p) where p is the n-th prime.

%C Same as A070750 (where additionally a(1)=0 is included). - _Joerg Arndt_, Apr 21 2016

%F a(n) = A070750(n). - _Joerg Arndt_, Apr 21 2016

%t p = Table[Prime[i], {i, 2, 101}]; Table[JacobiSymbol[p[[j]] - 1, p[[j]]], {j, 1, 100}]

%t a[n_] := (-1)^((Prime[n]-1)/2); Table[a[n], {n, 2, 101}] (* _Jean-François Alcover_, Apr 20 2016 *)

%o (PARI) a(n)=kronecker(-1,prime(n)) \\ _Charles R Greathouse IV_, Jun 13 2013

%o (PARI) a(n)=if(prime(n)%4==1,1,-1) \\ _Charles R Greathouse IV_, Jun 13 2013

%Y Cf. A070750, A039702.

%K sign,easy

%O 2,1

%A _Joseph L. Pe_, Nov 28 2002

%E Replaced "(p-1,p)" by "(-1,p)" in name, _Joerg Arndt_, Apr 21 2016

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 26 07:07 EDT 2024. Contains 371990 sequences. (Running on oeis4.)