How do you want to calculate this? I have a simple function that does the job.
I'm able to get around the standard: x^a mod n.
But only when it's regarding relatively small variables.
But what method should I use to solve problems like: 33809^26767 mod 46927?
Should I use Euler's Totient somehow? If so, how?!