Hi I was wondering if somebody could tell me how to find the least significant decimal digit of a large number - like how would i step through it and is there and algorithm numbers like this in general
eg 1002^3755
The least significant digit of $\displaystyle N$ is $\displaystyle N \pmod {10}$.
So in the case of your example:
$\displaystyle 1002^{3755}\equiv 2^{3755} \pmod{10}$
Now (you should know this) $\displaystyle 2^{10}=1024$
so:
$\displaystyle
2^{3755}=(2^{10})^{375}2^5\equiv 4^{375} \times 2 \pmod{10}
$
$\displaystyle
4^{375} \times 2=2^{751}=(2^{10})^{75} \times 2 \equiv 4^{75} \times 2 \pmod{10}
$
$\displaystyle
4^{75} \times 2=2^{151}=(2^{10})^{15} \times 2 \equiv 4^{15} \times 2 \pmod{10}
$
$\displaystyle
4^{15} \times 2=2^{31}=(2^{10})^3 \times 2\equiv 4^3 \times 2 \pmod{10}
$
and:
$\displaystyle
4^3 \times 2=128 \equiv 8 \pmod{10}
$
Hence:
$\displaystyle 1002^{3755}\equiv 8 \pmod{10}$
and so the least significant digit of $\displaystyle 1002^{3755}$ is $\displaystyle 8$.
.