I found an interesting exercise on Number Theory (maybe interesting just for me, as I don't know how to solve it).
Compute the iterative sum of digits of: $1976^{1976}$.
I really don't know how to solve this exercise. I noted that $2025$ is the next perfect square and $2025-1976=49$, so $1976=2025-49$, and $49$ is a perfect square too. So I have to compute the sum of digits of $(45^2 - 7^2)^{45^2-7^2}$. I don't know how would that help me, but seemed like a hint to me when I found these two square roots.
Please help me. Thank you very much!
(I am assuming "sum of digits" means "iterated sum of digits")
First note that the iterated sum of the (decimal) digits of a number $n$ is equal to $n \mod 9$.
Then note that $(a^b) \mod 9= ((a \mod 9)^b) \mod 9$.
So
$(1976^{1976}) \mod 9 = ((1976 \mod 9)^{1976}) \mod 9 = (5^{1976}) \mod 9$
Now calculate the first few powers of $5$ modulo $9$:
$5^2 \mod 9 = 25 \mod 9 = 7$
$5^3 \mod 9 = 5 \times 7 \mod 9 = 35 \mod 9 = 8$
$5^4 \mod 9 = 5 \times 8 \mod 9 = 40 \mod 9 = 4$
$5^5 \mod 9 = 5 \times 4 \mod 9 = 20 \mod 9 = 2$
$5^6 \mod 9 = 5 \times 2 \mod 9 = 10 \mod 9 = 1$
$5^7 \mod 9 = 5 \times 1 \mod 9 = 5 \mod 9 = 5$
Can you see you can use this pattern to find $(5^{1976}) \mod 9$ ?