1
$\begingroup$

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?

  • 0
    Why modulo $2^{64}$?2012-04-24
  • 0
    Anyway, see http://oeis.org/A023052 and the related sequences.2012-04-24
  • 0
    I don't know why $2^{64}$. That was the original problem. I think http://oeis.org/A003321 is this sequence. But there is very little information.2012-04-24
  • 0
    What information would you like?2012-04-25
  • 0
    I know that I can only dream about closed form formula :-) but I would like something that will help me write a program solves this problem..2012-04-25
  • 0
    If it's a question about writing a program, maybe you should take it to a programming site.2012-04-25
  • 0
    Maybe you're right. But it is also a mathematical problem. Besides from my experience math.se is much better in algorithmics than stackoverflow.2012-04-26

2 Answers 2