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!)
A173950 a(n) = 1 if 6 divides (prime(n) + 1), a(n) = -1 if 6 divides (prime(n) - 1), a(n) = 0 otherwise. 3

%I #24 May 21 2019 17:10:31

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

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

%N a(n) = 1 if 6 divides (prime(n) + 1), a(n) = -1 if 6 divides (prime(n) - 1), a(n) = 0 otherwise.

%C Equals -A134323 except for the first term. - _M. F. Hasler_, Oct 09 2011

%F a(n) = -A134323(n) for n > 1. - _M. F. Hasler_, Oct 09 2011

%F a(n) = -Kronecker(-12, prime(n)) = -Kronecker(prime(n), 12) = -A134667(prime(n)). - _Jianing Song_, Mar 17 2019

%t Table[Which[Divisible[Prime[n]+1,6],1,Divisible[Prime[n]-1,6],-1,True,0],{n,150}] (* _Harvey P. Dale_, Apr 24 2019 *)

%o (PARI) (From _M. F. Hasler_, Oct 09 2011) (Start)

%o A173950(n)=if(prime(n)%6==1,-1,n>2)

%o A173950(n)=(-1)^(prime(n)%3)*(n>2)

%o A173950(n)=[-1,0,0,0,1][prime(n)%6]

%o A173950(n)=if(n>2,prime(n)%6-3)/2 \\ (End)

%Y Cf. A134323, A099618, A132194.

%Y Cf. also A112632, A134667, A174695, A107323.

%K sign

%O 1

%A _Giovanni Teofilatto_, Nov 26 2010

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)