  Let p be any prime, and let a and n be nonnegative integers. Let $r\in Z$ and
$f(x)\in Z[x]$. We establish the congruence
  $$p^{\deg f}\sum_{k=r(mod p^a)}\binom{n}{k}(-1)^k f((k-r)/p^a) =0 (mod
p^{\sum_{i=a}^{\infty}[n/p^i]})$$ (motivated by a conjecture arising from
algebraic topology), and obtain the following vast generalization of Lucas'
theorem: If a is greater than one, and $l,s,t$ are nonnegative integers with
$s,t<p$, then
  $$\frac{1}{[n/p^{a-1}]!} \sum_{k=r(mod p^a)}
\binom{pn+s}{pk+t}(-1)^{pk}((k-r)/p^{a-1})^l =\frac {1}{[n/p^{a-1}]!}
\sum_{k=r(mod p^a)}\binom{n}{k}\binom{s}{t}(-1)^k((k-r)/p^{a-1})^l (mod p).$$
  We also present an application of the first congruence to Bernoulli
polynomials, and apply the second congruence to show that a p-adic order bound
given by the authors in a previous paper can be attained when p=2.
