Let $n$ be a positive integer. Prove that $n$ is prime if and only if \[{{n-1}\choose k}\equiv (-1)^{k}\pmod{n}\] for all $k \in \{ 0, 1, \cdots, n-1 \}$.
Problem
Source:
Tags: modular arithmetic, blogs, Congruences
25.05.2007 03:24
We will regardless use that we can calculate with fractions $\mod n$ as long as the denominator is coprime to $n$. It's not hard to show that we always can do that. If $n$ is not prime, let $q<n$ be the smallest prime dividing $n=aq$: $\binom{n-1}{q}= \frac{(n-1) \cdot (n-1) \cdot ... \cdot (n-q)}{1 \cdot 2 \cdot ... \cdot q} =$ $= \frac{n-q}{q} \cdot \frac{n-1}{1} \cdot \frac{n-2}{2} \cdot ... \cdot \frac{n-q+1}{q-1} \equiv (a-1) \cdot (-1)^{q-1} \mod n$. But $a-1 \not \equiv -1 \mod n$ (this would yield $a \equiv 0 \mod n$, so $n|a|n$, wrong). If $n$ is prime, we do the same calculation to get $\binom{n-1}{q}= \frac{(n-1) \cdot (n-1) \cdot ... \cdot (n-q)}{1 \cdot 2 \cdot ... \cdot q} =$ $= \frac{n-1}{1} \cdot \frac{n-2}{2} \cdot ... \cdot \frac{n-q+1}{q-1} \cdot \frac{n-q}{q} \equiv (-1)^q \mod n$.
30.04.2008 00:17
For a given $ n$, the set of congruences given are equivalent to $ 1=C(n-1,0)\equiv(-1)^0=1$ and $ C(n,i+1)=C(n-1.i)+C(n-1,i+1)\equiv(-1)^i+(-1)^(i+1)=0$ for $ 0\le i<n-1$. Thus the condition given is equivalent to $ C(n,i)$ being a multiple of $ n$ for all $ i$ in the range $ 1\le i\le n-1$. If $ n$ is prime, then for $ 1\le i\le n-1$, $ C(n,i)=n!/i!(n-i)!$ has a multple of $ p$ on the numerator but not on the denominator, so is divisible by $ p$. Now suppose $ p$ is a prime factor of $ n$ but $ n$ is not equal to $ p$. Then $ C(n,p)/n=(n-1)(n-2)...(n-(p-1))/p!$ has a multiple of $ p$ on the denominator but not on the numerator, so is not an integer. Thus $ C(n,p)$ is not divisible by $ n$. Luke See my puzzle blog at http://bozzball.blogspot.com
21.12.2021 08:43
ZetaX very nice solution .man ham shunday ishladim bosing brat.