Function to view N-th digit of large number?

Hello,
I would like to view numbers in the string on wanted position, eg. pi, e, 9^(9^9),…

I would like to see the digit on position 177486336 of the number 9^(9^9).
I read a lot on internet but I thing I missed something.

Thank you for recommendation.

I don’t know if this is the best way to do this, especially for big numbers, but my attempt gave this result:

a = 9^(9^9);
Take[IntegerDigits[a], {177486336}]

(* 3 *)

If the precision of this command for large numbers is correct this should be the result…

Just for curiosity this is the amount of digits of this number:

IntegerLength[9^(9^9)]

(* 369693100 *)

This looks great. I tried but it gave me this:

I know the length of this number and i would like to see

  • 7-digit sequence at position 177486336
  • 8-digit sequence at position 352695442

I got these results:

a = 9^(9^9);
{FromDigits[Take[IntegerDigits[a], {177486336, 177486342}]]}
{FromDigits[Take[IntegerDigits[a], {352695442, 352695449}]]}

7 digits starting at the position 177486336: (* 3955388 *)

8 digits starting at the position 352695442: (* 11623480 *)

Thank you.

Hello. I need to find the last digit of number 9^9^9, i tried

IntegerLength[9^(9^9)]

a i get a number of digits, but i cannot use

ResourceFunction["NthDigit"][9^(9^9),369693100]

or

ResourceFunction["NthDigit"][9^(9^9),{369693100}]

It didn´t work.
Please help me, how can i do it?

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 *)