A primality criterion based on a Lucas' congruence
  Let $p$ be a prime. In 1878 \'{E}. Lucas proved that the congruence $$ {p-1\choose k}\equiv (-1)^k\pmod{p}$$ holds for any nonnegative integer $k\in\{0,1,\ldots,p-1\}$. The converse statement was given in Problem 1494 of {\it Mathematics Magazine} proposed in 1997 by E. Deutsch and I.M. Gessel. In this note we generalize this converse assertion by the following result: If $n>1$ and $q>1$ are integers such that $$ {n-1\choose k}\equiv (-1)^k \pmod{q}$$ for every integer $k\in\{0,1,\ldots, n-1\}$, then $q$ is a prime and $n$ is a power of $q$. 
Romeo Mestrovic
math.NT