cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A081503 Number of steps to reach a single digit when map in A081502 is iterated.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 22 2003

Keywords

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