OFFSET
0,1
LINKS
Eric Weisstein's World of Mathematics, Wilson's Theorem
MATHEMATICA
Table[If[PrimeQ[2 n + 1], (-1)^Binomial[n + 2, 2], 0], {n, 0, 101}] (* Michael De Vlieger, Aug 22 2015 *)
PROG
(PARI) a(n) = if (isprime(2*n+1), ((-1)^ (binomial(n+2, 2))), 0); \\ Michel Marcus, Aug 16 2015
CROSSREFS
KEYWORD
sign
AUTHOR
Eric W. Weisstein, Dec 12 2005
STATUS
approved