Revised text, as per Ady's comments:

If 7a + 7/a = sqrt(98)

How much is (a^777) + 1/(a^777)?

=====================

Lets divide out 7 from the first equation. Then a + 1/a = sqrt(2).

Lets define a(n) = a^n + 1/a^n

Then we know a(1)=sqrt(2), and a(2) = 0 by direct evaluation.

Now I'll introduce an identity: a(n) = a(n-1)*a(1) - a(n-2).

Then a(3) = a(2)*sqrt(2) - a(1) = -sqrt(2)

a(4) = a(3)*sqrt(2) - a(2) = -2

a(5) = a(4)*sqrt(2) - a(3) = -sqrt(2)

a(6) = a(5)*sqrt(2) - a(4) = 0

a(7) = a(6)*sqrt(2) - a(5) = sqrt(2)

a(8) = a(7)*sqrt(2) - a(6) = 2

a(9) = a(8)*sqrt(2) - a(7) = sqrt(2)

a(10) = a(9)*sqrt(2) - a(8) = 0

Okay, at this point we can see that a(1)=a(9) and a(2)=a(10), Then a(n) is periodic with period 8.

777 = 97*8+1. Then **(a^777) + 1/(a^777) =** a(777) = a(1) **= sqrt(2)**.