login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

%I #16 Aug 23 2015 21:18:44

%S 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,

%T 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,

%U 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

%N a(n) = 1 if 2*n+1 is prime, otherwise a(n) = minimal residue of (-1)^binomial(n+2,2) mod (2n+1).

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/WilsonsTheorem.html">Wilson's Theorem</a>

%t Table[If[PrimeQ[2 n + 1], (-1)^Binomial[n + 2, 2], 0], {n, 0, 101}] (* _Michael De Vlieger_, Aug 22 2015 *)

%o (PARI) a(n) = if (isprime(2*n+1), ((-1)^ (binomial(n+2,2))), 0); \\ _Michel Marcus_, Aug 16 2015

%Y Apart from signs, same as A101264.

%K sign

%O 0,1

%A _Eric W. Weisstein_, Dec 12 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:12 EDT 2024. Contains 371969 sequences. (Running on oeis4.)