I've got another interesting programming/mathematical problem.
For a given natural number q from interval $[2; 10000]$ find the number $n$ which is equal to sum of $q$-th powers of its digits, modulo $2^{64}$.
for example:
for $q=3 \Rightarrow n=153$;
for $q=5 \Rightarrow n=4150$.
This was a programming task which my friend told me quite a long time ago. Now I remembered that and would like to know how such things can be done. How to approach this?