let X=(3^5^7^9)+1 find the last digit of x

To find the last digit of X=(3^5^7^9)+1, we need to calculate the exponentiation to simplify the expression. Let's break down the calculation step by step:

Step 1: Evaluate 5^7^9.
To calculate 5^7^9, we need to start from the rightmost exponent and work our way up.

First, calculate 7^9:
7^9 = 40353607

Next, calculate 5^40353607:
Since 5 multiplied by any number will always end with 5, this means that 5 raised to any power greater than 0 will always end with 5.
Therefore, 5^40353607 ends with digit 5.

Step 2: Calculate 3^5^7^9.
To calculate 3^5^7^9, we can find the last digit of 3^5^7^9 by finding the remainder when 5^7^9 is divided by 4.

Since the remainder of dividing any power of 5 by 4 is always 1, this means that 5^7^9 ≡ 1 (mod 4).

Thus, 3^5^7^9 is equivalent to 3^1 = 3.

Step 3: Add 1 to the result.
Now, we add 1 to the result: X = 3 + 1 = 4.

Therefore, the last digit of X=(3^5^7^9)+1 is 4.