11

Suppose that $p$ is a prime. Suppose further that $h$ and $k$ are non-negative integers such that $h + k = p − 1$.

I want to prove that $h!k! + (−1)^h \equiv 0 \pmod{p}$

My first thought is that by Wilson's theorem, $(p-1)! \equiv -1 \pmod{p}$, and $h!k!$ divides $(p-1)!$ (definition of a binomial). Where would I go from here?

Bill Dubuque
  • 272,048
Johan
  • 435

2 Answers2

9

Use the fact that

$$h! = (-1)^h (p-1)(p-2) \dots (p-h) \mod p$$

Aryabhata
  • 82,206
7

Generally $\!\! $ Wilson's theorem $\,\Rightarrow\,$ every complete system of representatives $\,r_i\,$ of $\rm\color{#c00}{nonzero}$ remainders mod $\,p\,$ has product $\equiv -1,\,$ by $\,r_i\equiv i\,\Rightarrow\,\displaystyle \prod_{i=1}^{p-1} r_i\equiv \prod_{i=1}^{p-1} i \equiv (p\!-\!1)!\equiv -1,\,$ by inductive extension of the Congruence Product Rule. In particular this is true for any sequence of $\,p\,$ consecutive integers with its unique $\rm\color{#c00}{multiple}$ of $\,p\,$ removed. OP is the special case below $$\, \underbrace{\color{#90f}{-h},\,-h\!+\!1,\ldots,\color{#0a0}{-1}}_{\!\!\textstyle\equiv\,\color{#90f}{k\!+\!1},\,k\!+\!2,\cdots,\color{#0a0}{p\!-\!1}}\!\!\!\!,\require{cancel}\color{#c00}{\cancel{0}\!,} 1,2,\ldots, k\ \ \ \text{with product}\ \ (-1)^h h!\,k!\,\equiv\, -1\qquad$$

since $\,\color{#90f}{-h\equiv k\!+\!1}\,$ by $\,h\!+\!k\!+\!1\equiv p\equiv 0$

Remark $ $ This is slight reformulation of the Wilson reflection formula mentioned yesterday

$$ k! = (p\!-\!1\!-\!h)! \,\equiv\, \frac{(-1)^{h+1}}{h!}\!\!\pmod{\! p},\,\ \ 0\le h < p\,\ {\rm prime}\qquad $$

for example $\ \ h!^2 ≡ (−1)^{h+1} \pmod p\ $ for $\ h = (p-1)/2$

Bill Dubuque
  • 272,048