cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A265643 a(n) = +-1 == ((p - 1)/2)! (mod p), where p is the n-th prime number == 3 (mod 4).

This page as a plain text file.
%I A265643 #36 Sep 05 2018 09:56:19
%S A265643 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,
%T A265643 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,
%U A265643 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
%N A265643 a(n) = +-1 == ((p - 1)/2)! (mod p), where p is the n-th prime number == 3 (mod 4).
%C A265643 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).
%C A265643 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)).
%C A265643 Mordell (1961) proved the same result 52 years earlier in a 2-page note in the Monthly. - _Jonathan Sondow_, Apr 09 2017
%H A265643 Robert Israel, <a href="/A265643/b265643.txt">Table of n, a(n) for n = 1..10000</a>
%H A265643 Michele Elia, <a href="http://dx.doi.org/10.12988/imf.2013.310193">A note on the sequence ((p-1)/2)! mod p</a>, International Mathematical Forum, 2013, Vol. 8, no. 37, pages 1813-1825.
%H A265643 L.J. Mordell, <a href="http://www.jstor.org/stable/2312481">The congruence (p-1/2)! == +-1 (mod p)</a>, Amer. Math. Monthly, 68 (1961), 145-146.
%e A265643 The second prime number == 3 (mod 4) is 7. Since ((7 - 1)/2)! = 3! = 6 == -1 (mod 7), it follows that a(2) = -1.
%p A265643 map(p -> if isprime(p) then mods(((p-1)/2)!, p) fi, [seq(i,i=3..10000, 4)]); # _Robert Israel_, Dec 11 2015
%t A265643 Function[p, Mod[((p-1)/2)!, p, -1]] /@ Select[Range[3, 2003, 4], PrimeQ] (* _Jean-François Alcover_, Feb 27 2016 *)
%Y A265643 Cf. A000924, A002145, A004055.
%K A265643 sign
%O A265643 1,1
%A A265643 _Carlo Sanna_, Dec 11 2015