Hi there,

I stumbled upon a weird question in one of my exams which I couldn't solve so I out of curiosity I wanted to see what the solution could be. Here goes:
Given some natural number N and some natural number Z, how would you find out if the following summation is divisible by Z:

$\displaystyle SIGMA(k=1, n) n^n $
$\displaystyle OR: 1^1 + 2^2 + 3^3 + .... + n^n$

Any ideas on how to check if the above is divisible by Z without actually having to solve it? Is there some sort of pattern?