login
This site is supported by donations 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

Table of n, a(n) for n=1..72.

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 *)

PROG

(PARI) a(n)=if(prime(n)\/6%2, -1, 1) \\ Charles R Greathouse IV, May 13 2015

CROSSREFS

Cf. A070750, A134323.

Sequence in context: A104121 A179770 A189078 * A173950 A157928 A159075

Adjacent sequences:  A257831 A257832 A257833 * A257835 A257836 A257837

KEYWORD

sign,easy

AUTHOR

Miguel Angel Velilla Mula, May 10 2015

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 22 08:31 EDT 2019. Contains 326172 sequences. (Running on oeis4.)