# Function to view N-th digit of large number?

**URL:** <https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185>\
**Category:** Questions\
**Created:** [June 7, 2019, 4:51am UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185 "2019-06-07T04:51:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ksergej](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@ksergej](https://community.wolfram.com/u/ksergej)\
**Post date:** [June 7, 2019, 4:51am UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185/1 "2019-06-07T04:51:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![quimicalobo](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/quimicalobo/32/8777_2.png) [@quimicalobo](https://community.wolfram.com/u/quimicalobo)\
**Post date:** [June 7, 2019, 6:10am UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185/2 "2019-06-07T06:10:54Z")

</div>

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

 ![4268im1.png](https://global.discourse-cdn.com/wolfram/original/1X/66b5040f7a0c31685736976f85ba3eef7db68720.png)

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

---

<div class="post-metadata">

**Author:** ![ksergej](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@ksergej](https://community.wolfram.com/u/ksergej)\
**Post date:** [June 7, 2019, 6:33am UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185/3 "2019-06-07T06:33:05Z")

</div>

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

 ![Beznázvu.png](https://global.discourse-cdn.com/wolfram/original/3X/0/b/0bae7b5c8cfee11304221e860e7a836065c0c35a.png)

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

---

<div class="post-metadata">

**Author:** ![quimicalobo](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/quimicalobo/32/8777_2.png) [@quimicalobo](https://community.wolfram.com/u/quimicalobo)\
**Post date:** [June 7, 2019, 6:56am UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185/4 "2019-06-07T06:56:54Z")

</div>

I got these results:

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

```

 ![5750im2.png](https://global.discourse-cdn.com/wolfram/original/3X/6/9/69e3f8ea93cefb48d56fd59ec34ade39f9104f45.png)

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

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

---

<div class="post-metadata">

**Author:** ![ksergej](https://avatars.discourse-cdn.com/v4/letter/k/ea666f/32.png) [@ksergej](https://community.wolfram.com/u/ksergej)\
**Post date:** [June 7, 2019, 7:01am UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185/5 "2019-06-07T07:01:12Z")

</div>

Thank you.

---

<div class="post-metadata">

**Author:** ![xjane19](https://avatars.discourse-cdn.com/v4/letter/x/e47774/32.png) [@xjane19](https://community.wolfram.com/u/xjane19)\
**Post date:** [January 18, 2022, 12:13pm UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185/6 "2022-01-18T12:13:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [January 18, 2022, 4:11pm UTC](https://community.wolfram.com/t/function-to-view-n-th-digit-of-large-number/14185/7 "2022-01-18T16:11:45Z")

</div>

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

```
