.
>
Well 37 is prime, thus: $\displaystyle 7^{36}\equiv{1}(\bmod.37)$ (Fermat's little theorem)
$\displaystyle 7^{25}\equiv{z}(\bmod.36)$ with $\displaystyle 0\leq{z}<36$
Thus: $\displaystyle 7^{7^{25}}=7^{36k+z}\equiv{7^{z}}(\bmod.37)$ where k is a natural number
We shall now find $\displaystyle z$
Note that $\displaystyle \phi(36)=12$ thus by Euler's Theorem: $\displaystyle 7^{12}\equiv{1}(\bmod.36)$ and (squaring) $\displaystyle 7^{24}\equiv{1}(\bmod.36)$
So: $\displaystyle 7^{25}\equiv{7}(\bmod.36)$ and $\displaystyle z=7$
We finally get that: $\displaystyle 7^{7^{25}}\equiv{7^7}(\bmod.37)$
For the order of 17, you might be tempted to try Euler's theorem, but it will not give you an answer. However it will let you narrow your search. Then you can kill the problem by case wise analysis.
What I mean is:
Indeed $\displaystyle 17^{\phi(27)} \equiv 1 \mod 27 \Rightarrow 17^{18} \equiv 1 \mod 27$
But this only says the order divides 18. So it can be any element from the set {2,3,6,9,18}.
Try all these possibilities in the increasing order and you will get 6 as the answer.
Sorry about my first post. Doubt if it was much help. I was in a hurry and got to thinking of someting else. Anyway:
Here's one way I got to looking at.
There are 9 non zero modulo 37 residues. So we must figure out where $\displaystyle 7^{25}$ lies in this repeating chain of remainders.
$\displaystyle 7^{0}\equiv{1}(mod \;\ 37)$
$\displaystyle 7^{1}\equiv{7}(mod \;\ 37)$
$\displaystyle 7^{2}\equiv{12}(mod \;\ 37)$
$\displaystyle 7^{3}\equiv{10}(mod \;\ 37)$
$\displaystyle 7^{4}\equiv{33}(mod \;\ 37)$
$\displaystyle 7^{5}\equiv{9}(mod \;\ 37)$
$\displaystyle 7^{6}\equiv{26}(mod \;\ 37)$
$\displaystyle 7^{7}\equiv{34}(mod \;\ 37)$
$\displaystyle 7^{8}\equiv{16}(mod \;\ 37)$
Then they repeat.
But, $\displaystyle 7^{25}\equiv{7}(mod \;\ 9)$
That means $\displaystyle 7^{25}$ is 7 more than a multiple of 9.
So, we count up the residues and see we light at a remainder of 34.
Another thing we may be able to do is since $\displaystyle 7^{9}\equiv{1}(mod \;\ 37)$, we can break $\displaystyle 7^{25}$ into as many powers of $\displaystyle 7^{9}$ as possible.
$\displaystyle 7^{25}=7^{7}\cdot{7^{18}}=7^{7}(7^{9})^{2}=7^{7}(1 )^{2}=7^{7}\equiv{34}(mod \;\ 37)$