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!)
A257834 a(n) = 1 if n-th prime is == +1 or -1 mod 12; -1 if n-th prime is == 5 or 7 mod 12; and 0 if n-th prime is 2 or 3. 3
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, 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
COMMENTS
a(n) = A070750(n) * A134323(n).
Every prime number > 3 is of the form 4n+1 or 4n-1. Also, every prime number > 3 is of the form 6n+1 or 6n-1. This sequence takes the residue (+1 or -1) after dividing primes > 3 by 4 and 6, and multiplies them to produce terms that also take the values +1 or -1.
LINKS
EXAMPLE
For n=3 (p=5), prime(3) = 5 = (4*1 + 1) = (6*1 - 1), then a(3) = 1 * -1 = -1.
For n=4 (p=7), prime(4) = 7 = (4*2 - 1) = (6*1 + 1), then a(4) = -1 * 1 = -1.
MATHEMATICA
Table[If[Mod[Prime[n + 2], 4] == 3, -1, 1] If[Mod[Prime[n + 2], 6] == 5, -1, 1], {n, 60}] (* Michael De Vlieger, May 12 2015 *)
Table[Which[MemberQ[{1, 11}, Mod[p, 12]], 1, MemberQ[{5, 7}, Mod[p, 12]], -1, True, 0], {p, Prime[Range[80]]}] (* Harvey P. Dale, Aug 05 2021 *)
PROG
(PARI) a(n)=if(prime(n)\/6%2, -1, 1) \\ Charles R Greathouse IV, May 13 2015
CROSSREFS
Sequence in context: A104121 A179770 A189078 * A173950 A157928 A159075
KEYWORD
sign,easy
AUTHOR
EXTENSIONS
Edited by Charles R Greathouse IV, May 13 2015 and 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 05:48 EDT 2024. Contains 371265 sequences. (Running on oeis4.)