# Primes p such that p | ((p-1)/2)! + 1 [duplicate]

Possible Duplicate:
Primes P such that ((P-1)/2)!=1 mod P

Motivation comes from comments in this question, and it is interesting in its own right. These primes are sequence A055939 in OEIS.

So, which primes $p$ satisfy $p\\ |\\ (\frac{p-1}{2})! + 1$?

If my calculations (in sage) are correct, the following is true for all primes under 100,000. For $p > 3$: $$p\\ |\\ (\frac{p-1}{2})! + 1 \iff h(\sqrt{-p})=1 \mod{4}$$

## marked as duplicate by Kevin Buzzard, Harald Hanche-Olsen, Robin Chapman, François G. Dorais♦Jul 2 '10 at 0:32

This question was marked as an exact duplicate of an existing question.

• This is a duplicate of mathoverflow.net/questions/16141/… . Sorry Dror---I could have told you that earlier. – Kevin Buzzard Jul 1 '10 at 10:37
• Perhaps it's time for the OEIS entry to be updated. – j.c. Jul 1 '10 at 18:03
• Dror, does this mean that the Cohen-Lenstra Heuristics are relevant to my question? – François G. Dorais Jul 2 '10 at 18:01
• Well, in a way. 1. From what I remember, in the original paper by Cohen and Lenstra there is no mention of congruences on the class number. 2. You also need the truth of the first Hardy-Littewood conjecture to pairs $(n, 2n-3)$. – Dror Speiser Jul 2 '10 at 18:34

## 1 Answer

Yes, this follows from the analytic class number formula. See http://www.math.niu.edu/~rusin/known-math/97/sign .

Added I have now found a reference. This is a theorem of Mordell:

L. J. Mordell, The congruence $(p - 1/2)! \equiv \pm 1 (\operatorname{mod} p)$, American Mathematical Monthly, 68 (1961), 145-146. http://www.jstor.org/stable/2312481

• Yeah but it's still a duplicate, and furthermore this reference and many other things are in the other thread. The less gets added here, the better. – Kevin Buzzard Jul 1 '10 at 15:54
• Ouch Kevin, I only just noticed this.... – Robin Chapman Jul 1 '10 at 16:43