login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A112448
a(n) = 1 if 2*n+1 is prime, otherwise a(n) = minimal residue of (-1)^binomial(n+2,2) mod (2n+1).
0
0, -1, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, -1, -1, 0, 1, 0, 0, 1, 0, 0, -1, 1, 0, 0, -1, 0, 1, -1, 0, 0, 1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, 1, 1, 0, -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, -1, -1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 1, 0, 0, -1, 1, 0, 0, 0, 0, 1, -1, 0, 1, 1, 0, 0
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
Apart from signs, same as A101264.
Sequence in context: A130854 A165191 A189576 * A101264 A189723 A095770
KEYWORD
sign
AUTHOR
Eric W. Weisstein, Dec 12 2005
STATUS
approved