You should be familiar with [ur=http://en.wikipedia.org/wiki/Modular_arithmetic]modular arithmetics[/url] and congruences to do this.
Whether you want to this by hand or by computer, an effective way is to compute powers for the exponents:
1729 -> 864 -> 432 -> 216 -> 108 -> 54 -> 27 -> 13 -> 6 -> 3 -> 1
(If you already know n-th power, then you can easily compute (2n)-th power, and by multiplying by 2, you get the (2n+1)-st power.)
This method is described in this wikipedia article.
For instance, you can start as