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!)
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, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
By Wilson's theorem, ((p - 1)/2)!^2 == (-1)^((p + 1)/2) (mod p) for each prime number p. Hence, if p == 3 (mod 4), then ((p - 1)/2)! == +-1 (mod p).
Michele Elia proved that a(n) = (-1)^((1 + h(-p)) / 2) for n > 1, where p is the n-th prime number == 3 (mod 4), and h(-p) is the class number of the quadratic field Q(sqrt(-p)).
Mordell (1961) proved the same result 52 years earlier in a 2-page note in the Monthly. - Jonathan Sondow, Apr 09 2017
LINKS
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.
EXAMPLE
The second prime number == 3 (mod 4) is 7. Since ((7 - 1)/2)! = 3! = 6 == -1 (mod 7), it follows that a(2) = -1.
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 *)
CROSSREFS
Sequence in context: A157895 A077008 A158387 * A283131 A008836 A087960
KEYWORD
sign
AUTHOR
Carlo Sanna, Dec 11 2015
STATUS
approved

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 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)