A177148 a(n) = number of squares of summations of digits before reaching the end of the cycle.
0, 0, 5, 2, 4, 4, 2, 3, 3, 1, 1, 5, 2, 4, 4, 2, 3, 3, 1, 2, 5, 2, 4, 4, 2, 3, 3, 1, 2, 5, 2, 4, 4, 2, 3, 3, 1, 2, 5, 2, 4, 4, 2, 3, 3, 1, 2, 5, 2, 2, 4, 2, 3, 3, 1, 2, 5, 2, 2, 3, 2, 3, 3, 1, 2, 5, 2, 2, 3, 2, 3, 3, 1, 2, 5, 2, 2, 3, 2, 2, 3, 1, 2, 5, 2, 2, 3, 2, 2, 4, 1, 2, 5, 2, 2, 3, 2, 2, 4, 2, 1, 5, 2, 4, 4
Offset: 0
Examples
0 is in the sequence twice because 0->0 and 1 -> 1 ; 5 is in the sequence because : 5 -> 25 -> 49 -> 169 -> 256, last number because 256 -> 169.
Crossrefs
Cf. A118881.
Programs
-
Maple
A177148 := proc(n) local traj ,a,m,c; traj := n ; c := [n] ; while true do traj := A118881(traj) ; if member(traj,c) then return nops(c)-1 ; end if; c := [op(c),traj] ; end do: end proc: # R. J. Mathar, Jul 08 2012
Comments