n = 2^40 + 3^40
Check the final answer first, then review the worked steps.
Check the final answer first, then review the worked steps.
u(2^{40}) = u((2^4)^{10}) = u(6^{10}) = 6
u(3^{40}) = u((3^4)^{10}) = u(1^{10}) = 1
u(n) = u(6+1) = 7
The last digit of $2^{40}$ is $6$ (since $2^4=16$ and $40$ is a multiple of $4$) and the last digit of $3^{40}$ is $1$ (since $3^4=81$ and $40$ is a multiple of $4$). Thus, the last digit of $n$ is $6+1=7$.