proof of Lucas’s theorem
Let . Let be the least non-negative residuesof , respectively. (Additionally, we set , and is theleast non-negative residue of modulo .) Then the statement follows from
We define the ’carry indicators’ for all as
and additionally .
The special case of Anton’s congruence![]()
is:
| (1) |
where as defined above, and is the product of numbers not divisible by .So we have
When dividing by the left-hand terms of the congruences for and , we seethat the power of is
So we get the congruence
or equivalently
| (2) |
Now we consider . Since
. So both congruences–the one in thestatement and (2)– produce the same results.