%I #33 Aug 05 2021 18:51:38
%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,
%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
%N 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.
%C a(n) = A070750(n) * A134323(n).
%C 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.
%e For n=3 (p=5), prime(3) = 5 = (4*1 + 1) = (6*1 - 1), then a(3) = 1 * -1 = -1.
%e For n=4 (p=7), prime(4) = 7 = (4*2 - 1) = (6*1 + 1), then a(4) = -1 * 1 = -1.
%t 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 *)
%t 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 *)
%o (PARI) a(n)=if(prime(n)\/6%2,-1,1) \\ _Charles R Greathouse IV_, May 13 2015
%Y Cf. A070750, A134323.
%K sign,easy
%O 1
%A _Miguel Angel Velilla Mula_, May 10 2015
%E Edited by _Charles R Greathouse IV_, May 13 2015 and _N. J. A. Sloane_, Jun 21 2015
|