|
|
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
|
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
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|