There is no need to compute all the digits to determine the last one. Observe the pattern
Table[9^i, {i, 1, 10, 2}]
(* {9, 729, 59049, 4782969, 387420489} *)
Table[9^i, {i, 2, 10, 2}]
(* {81, 6561, 531441, 43046721, 3486784401} *)
Odd powers end in 9
, even powers end in 1
. Since 9^9
is odd, the last digit of 9^(9^9)
must be 9
.
Verify by computing the number
9^(9^9) // IntegerDigits // Last
(* 9 *)