I was currently solving a question of permutations and in that I had to find the total ways of something. The answer was ${8\choose 4}$ which has last digit $0$ .
A random thought that came to my mind was that whether we had a manual way to compute the last digit of a number such as ${369\choose 233}$ . I know after $4!$ all have last digit $0$ but somehow it might be possible that it gets cancelled and we have last digit as $5$. I know basics of modular algebra but not much in deep so can you guys help. Thanks
The remainder of binomial coefficients with respect to primes is given by Lucas' theorem: For non-negative integers $m$ and $n$ and a prime $p$,
$$\binom{m}{n}\equiv\prod_{i=0}^k\binom{m_i}{n_i}\bmod p\;,$$
where $m_i$ and $n_i$ are the $i$-th digits of $m$ and $n$, respectively. To find the last digit of a binomial coefficient, we need its remainders modulo $2$ and $5$. For $\binom84$ we have
\begin{align} 8_{10}&=1000_2\;,\\ 4_{10}&=100_2\;,\\ 8_{10}&=13_5\;,\\ 4_{10}&=4_5\;, \end{align}
so
$$ \binom84\equiv\binom00\binom00\binom01\binom10\equiv0\bmod2 $$
and
$$ \binom84\equiv\binom34\binom10\equiv0\bmod5\;, $$
confirming that $\binom84\equiv0\bmod10$. For $\binom{369}{233}$ we have
\begin{align} 369_{10}&=101110001_2\;,\\ 233_{10}&=11101001_2\;,\\ 369_{10}&=2434_5\;,\\ 233_{10}&=1413_5\;, \end{align}
so
$$ \binom{369}{233}\equiv\binom11\binom00\binom00\binom01\binom10\binom11\binom11\binom01\binom10\equiv0\bmod2 $$
and $$\binom{369}{233}\equiv\binom43\binom31\binom44\binom21\bmod5\equiv4\bmod5\;,$$
yielding $\binom{369}{233}\equiv4\bmod10$, and indeed $\binom{369}{233}$ is