Skip to main content.

The number 153

Orbits of the Radix 10 Digit Cubing Function

Orbits of the Radix 10 Digit Cubing Function

  Define a function on the integers as follows:

DEF:   f(n) = sum of the cubes of the base-ten digits of n.

So, for example, f(13)=1^3+3^3=28. Then we have the following:

Proposition:   Pick any integer x_0 which is divisible by 3, and let x_n+1=f(x_n), then the sequence x_n converges in finitely many steps to the number 153.

	Ex: x_0=15
	    x_1=f(x_0)=f(13)=126
	    x_2=f(126)=225
	    x_3=f(225)=141
	    x_4=f(141)=66
	    x_5=f(66)=432
	    x_6=f(432)=99
	    x_7=f(99)=1458
	    x_8=f(1458)=702
	    x_9=f(702)=351
	    x_10=f(351)=153

  Here is a fun Java Applet which allows you to compute Cubic Orbits. Notice that you can enter non-3-divisible integers and get other interesting results as well. The display will stop after a fixed point is reached, or after 100 iterations. This was my *first* Applet from a long time ago, so it's probably buggy. I've thought about writing a new version which will allow you to change both the Radix and the exponent function used...

  This fun little proposition can be proved by first noting that 153 is indeed a fixed point. Next, consider that for any integer with k digits, the largest that f(k) can be is k*9^3; that is the largest result is if all k digits are 9. At the same time, the smallest that an integer with k digits can be is 10^(k-1), or a 1 followed by k-1 zeroes. If the leading digit were a zero, then by definition it would not have "k" digits.

  From this it is trivial to prove that f(n) < n for all n with 5 or more digits, that is k*9^3 < 10^(k-1) for k>=5. Consequently, the series must be drawn into the integers in the interval [3,10000]. All that remains is to prove that the series converges for all integers divisible by three in this interval, which is easy to do computationaly.

  I have checked this numerically to about 300,000, not to ensure convergence but rather to look for the longest sequence in that set, which was 13 steps. But I'm not telling which integer it was :)

  Here is some c code (written for SunOS4.1):


#include <stdio.h>
#include <math.h>

void main (argc,argv)
int argc;
char **argv;

{
  int orbit;  /*orbit measure the number of iterations for convergence*/
  int bailout;/*bailout gives an upper bound for orbit (while break) */
  int failed; /*failed counts the number of times orbit exceeds bailout*/
  int j, k; /* Various indices and temp variables */
  int m, m_n;
  int max_orbit, min_orbit;
  int max_m, min_m; /*Recorded for stats at end */
  int start, length; /* Obvious? */
  int max_m_n; /* Represents the largest intermediate value */

  if (argc < 3) 
  { printf("\n Written by Poul E.J. Petersen 1996 (petersp@math.orst.edu)\n\n Usage: cubic_orbit153 start length \n\n"); } else
  {
  sscanf(argv[1],"%i",&start);
  sscanf(argv[2],"%i",&length);
  bailout=100; 
  max_orbit = 0;
  max_m = 0;
  min_orbit = bailout + 1;
  min_m = 153;
  failed = 0;
  orbit = 0;
  max_m_n=0;
  printf("\n Starting Computation using a bailout of %i \n",bailout);
  for (j=start;j<start+length;j++) 
  {
    m = 3*j;
    orbit = 0;
    while (orbit < bailout && m != 153)
    {
      m_n = 0;
      while (m != 0)
      {
        m_n = m_n + (m%10)*(m%10)*(m%10);
	m = m/10;
      }
      m = m_n;
      if (m > max_m_n) max_m_n=m;
      orbit++;
    }
    if (orbit < bailout)
    {
      printf("%i \t %i\n",3*j,orbit);
    } else
    {
      printf("The integer \t%i\t EXCEEDED the BAILOUT of \t%i\t",bailout);
      failed++;
    }
    if (orbit > max_orbit)
    {
      max_orbit = orbit;
      max_m = 3*j;
    }
    if (orbit < min_orbit)
    {
      min_orbit = orbit;
      min_m = 3*j;
    }
  }
  printf ("\n\n Computations Complete. Stats: \n\n");
  printf ("\t Maximum orbit was %i for integer %i\n",max_orbit,max_m);
  printf ("\t Minimum orbit was %i for integer %i\n",min_orbit,min_m);
  printf ("\t Orbit Computations exceeded bailout %i times\n",failed);
  printf ("\t The largest intermediate value was %i \n\n",max_m_n);
}}