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.

Showing 1-1 of 1 results.

A182128 Number of iterations of the map n -> (sum of the decimal digits of n)^3 before reaching the last number of the cycle.

Original entry on oeis.org

0, 0, 2, 3, 3, 2, 3, 3, 1, 2, 1, 2, 3, 3, 2, 3, 3, 1, 2, 2, 2, 3, 3, 2, 3, 3, 1, 2, 2, 2, 3, 3, 2, 3, 3, 1, 2, 2, 2, 2, 3, 2, 3, 3, 1, 2, 2, 2, 2, 3, 2, 3, 3, 1, 2, 2, 2, 2, 3, 2, 3, 3, 1, 2, 2, 2, 2, 3, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2
Offset: 0

Views

Author

Michel Lagneau, Apr 13 2012

Keywords

Comments

a(n) is the number of times that the cube of the sum of the digits must be calculated before reaching the last number of the cycle.

Examples

			0 is in the sequence twice because 0 -> 0 and 1 -> 1;
a(3) = 3:
    3 ->       3^3 = 27;
   27 ->   (2+7)^3 = 729;
  729 -> (7+2+9)^3 = 18^3 = 5832 is the end of the map because 5832 -> (5+8+3+2)^3 = 18^3 is already in the trajectory. Hence we obtain the map: 3 -> 27 -> 729 -> 5832 with 3 iterations.
		

Crossrefs

Programs

  • Maple
    A182128 := proc(n)
            local traj ,c;
            traj := n ;
            c := [n] ;
            while true do
                    traj := A118880(traj) ;
                    if member(traj,c) then
                            return nops(c)-1 ;
                    end if;
                    c := [op(c),traj] ;
            end do:
    end proc:
    seq(A182128(n),n=0..80) ; # R. J. Mathar, Jul 08 2012
Showing 1-1 of 1 results.