7.1. The natural number $n$ and the real number $a$ satisfy the relation

$$
n-\left(\frac{a-1}{a+1517}+\frac{\sqrt{|a|-2023}+\sqrt{2023-|a|}}{a-2023}\right)^{2024}=0
$$

Determine the last digit of the number $n$.
## Solution.

From the existence conditions of $\sqrt{|a|-2023}$ and $\sqrt{2023-|a|}$, we obtain $|a|-2023 \geq 0$ and $2023-|a| \geq 0$, which are equivalent to $|a| \geq 2023$ and $|a| \leq 2023$. From the last two inequalities, we get $|a|=2023$, or $a= \pm 2023$.

Since the denominator of the fraction $\frac{\sqrt{|a|-2023}+\sqrt{2023-|a|}}{a-2023}$ cannot be zero, we get $a \neq 2023$. For $a=-2023$, we obtain

$n-\left(\frac{-2023-1}{-2023+1517}+\frac{\sqrt{|-2023|-2023}+\sqrt{2023-|-2023|}}{-2023-2023}\right)^{2024}=0, n-4^{2024}=0, n=4^{2024}$. Since $n=4^{2024}=\left(4^{2}\right)^{1012}=16^{1012}$, we get that the last digit of the number $n$ is 6.

Answer: The last digit of the number $n$ is 6.