A081503 Number of steps to reach a single digit when map in A081502 is iterated.
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3
Offset: 0
Examples
19 -> 3+9 = 12 -> 3+2 = 5, taking 2 steps, so a(19)=2.
Programs
-
Maple
A081503 := proc(n) local nitr,a ; nitr := n ; a := 0 ; while nitr > 9 do nitr := A081502(nitr) ; a := a+1 ; end do; a ; end proc: # R. J. Mathar, Oct 03 2014
Formula
a(n) = O(log n).
Extensions
More terms from Matthew Conroy, Jan 16 2006
Formula from Charles R Greathouse IV, Aug 02 2010