A182160 Number of iterations of the map n -> sum of the n-powers of the decimal digits of n.
0, 8, 3, 25, 18, 57, 8, 169, 181, 1, 61, 164, 177, 573, 209, 785, 288, 1121, 347, 517, 549, 2219, 53, 481, 871, 3144, 878, 3336, 777, 2369, 996, 1577, 655, 5109, 936, 3040, 5290, 1698, 652, 1349, 4000, 2781, 4083, 5559, 2769, 7834, 7098, 4686, 3451, 14278, 5998
Offset: 1
Examples
a(7) = 8 because: 7^7 = 823543; 8^7+2^7+3^7+5^7+4^7+3^7 = 2196163; 2^7+1^7+9^7+6^7+1^7+6^7+3^7 = 5345158; 5^7+3^7+4^7+5^7+1^7+5^7+8^7 = 2350099; 2^7+3^7+5^7+0^7+0^7+9^7+9^7 = 9646378; 9^7+6^7+4^7+6^7+3^7+7^7+8^7 = 8282107; 8^7+2^7+8^7+2^7+1^7+0^7+7^7 = 5018104; 5^7+0^7+1^7+8^7+1^7+0^7+4^7 = 2191663 is the end of the cycle with 8 iterations because 2191663-> 2^7+1^7+9^7+1^7+6^7+6^7+3^7 = 5345158 is already in the trajectory.
Programs
-
Maple
with(numtheory) : T :=array(1..20000) :W:=array(1..20000):for n from 1 to 85 do : k:=0:nn:=n:for it from 1 to 20000 do:T :=convert(nn, base, 10) :l:=nops(T):s:=sum(T[i]^n, i=1..l):k:=k+1:W[k]:=s:nn:=s:od: z:= [seq(W[i], i=1..k)]:V:=convert(z, set):n1:=nops(V): printf ( "%d %d \n",n,n1):od:
Comments