A265643 a(n) = +-1 == ((p - 1)/2)! (mod p), where p is the n-th prime number == 3 (mod 4).
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, 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, -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, 1, -1, 1, 1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1
Offset: 1
Keywords
Examples
The second prime number == 3 (mod 4) is 7. Since ((7 - 1)/2)! = 3! = 6 == -1 (mod 7), it follows that a(2) = -1.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
- Michele Elia, A note on the sequence ((p-1)/2)! mod p, International Mathematical Forum, 2013, Vol. 8, no. 37, pages 1813-1825.
- L.J. Mordell, The congruence (p-1/2)! == +-1 (mod p), Amer. Math. Monthly, 68 (1961), 145-146.
Programs
-
Maple
map(p -> if isprime(p) then mods(((p-1)/2)!, p) fi, [seq(i,i=3..10000, 4)]); # Robert Israel, Dec 11 2015
-
Mathematica
Function[p, Mod[((p-1)/2)!, p, -1]] /@ Select[Range[3, 2003, 4], PrimeQ] (* Jean-François Alcover, Feb 27 2016 *)
Comments