OFFSET
2,2
LINKS
Dimitris Valianatos, Comments on this sequence, Apr 25 2016
FORMULA
Product_{n>2} (1-1/a(n)) = (1-1/3)*(1-1/(-3))*(1-1/(-5))*(1-1/7)*(1-1/9)*(1-1/(-9))*(1-1/(-11))*(1-1/15)*(1-1/(-15))*... = (2/3)*(4/3)*(6/5)*(6/7)*(8/9)*(10/9)*(12/11)*(14/15)*(16/15)*... = 1.
So Product_{n>2} (1-a(n)^(-1)) = Product_{n>2}(1-a(n)^(-1))^(-1) = (Product_{n>2}(1-a(n)^(-1)))^k = 1, for every k.
Sum_ {n>2} log(1-1/a(n)) = 0.
EXAMPLE
For n=11, prime(11) = 31, 31 mod 4 == 3 so a(11) = (1-31)/2 = -15.
MATHEMATICA
If[Mod[#, 4]==1, (1+#)/2, (1-#)/2]&/@Prime[Range[2, 80]] (* Harvey P. Dale, May 09 2017 *)
PROG
(PARI) {forstep(n=3, 1000, 2, if(isprime(n), if(n%4==1, p=(1+n)/2, p=(1-n)/2); print1(n"-> "p", "))); }
CROSSREFS
KEYWORD
sign
AUTHOR
Dimitris Valianatos, Apr 23 2016
EXTENSIONS
Corrected and extended by Harvey P. Dale, May 09 2017
STATUS
approved