first of all can anyone tell me if this q uses any modular arithmetic..
bec its getting very untidy with congruency...
I should have mentioned in my last hint that for Euler's Theorem to work i.e. , we need . So Euler's Theorem doesn't apply to every term here.
Now do something similar to this: http://www.mathhelpforum.com/math-he...remainder.html