# Sums of Powers of Digits

Given numbers N and m, compute the sum of digits of N raised to the power of m. For example, let ^{2} + 1^{2} + 2^{2} + 7^{2}^{2} + 5^{2}*iteratively* from one another, and their sequence is said to be an *iterative process.* A question of interest is what happens when you run an iterative process long enough.

In the decimal system, squaring of digits may only result in cycles. I.e., from a certain point on the process starts repeating itself. Raising digits to the third power and adding up leads to one of 5 points: 1, 153, 370, 371, 407. Modulo 3 those numbers are 1, 0, 1, 2, 2. All whole numbers divisible by 3 eventually settle on 153. Function f in this case has the property that it preserves the value modulo 3. For example, all iterates of a number equal 2 modulo 3 are equal 2 modulo 3. Far as I can judge, such numbers settle on either 371 or 407. On the other hand, there are cycles of numbers equal to ^{3} + 4^{3} + 4^{3} = 136,^{3} + 3^{3} + 6^{3} = 244.

What if applet does not run? |

|Contact| |Front page| |Contents| |Algebra|

Copyright © 1996-2018 Alexander Bogomolny

68937092