This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A061903 Number of distinct elements of the iterative cycle: n -> sum of digits of n^2. 6
 1, 1, 4, 1, 3, 3, 1, 2, 2, 1, 1, 4, 1, 2, 2, 1, 2, 3, 1, 2, 4, 1, 2, 2, 2, 2, 3, 2, 3, 2, 1, 2, 3, 2, 2, 2, 2, 3, 2, 1, 3, 2, 2, 3, 3, 1, 2, 2, 1, 3, 3, 1, 2, 3, 2, 2, 2, 2, 2, 2, 1, 2, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 2, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 1, 3, 3, 3, 3, 2, 2, 3, 3, 2, 1, 4, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS It seems that any such iterative cycle can contain at most 4 distinct elements. a(197483417) = 5 is the first counterexample: 136 -> 28 -> 19 -> 10 -> 1. In fact this sequence is unbounded, since you can extend any chain leftward with the number k999...999 for suitably chosen k. In particular this gives the (pessimistic) bound that there is some n < 10^21942602 with a(n) = 6. - Charles R Greathouse IV, May 30 2014 LINKS Robert Israel, Table of n, a(n) for n = 0..10000 EXAMPLE a(2) = 4 since 2 -> 4 -> 1+6 = 7 -> 4+9 = 13 -> 1+6+9 = 16 -> 2+5+6 = 13, thus {4,7,13,16} are the distinct elements of the iterative cycle of 2. a(6) = 1 since 6 -> 3+6 = 9 -> 8+1 = 9 thus 9 is the only element in the iterative cycle of 6. MAPLE A:= proc(n) local L, m, x;   L:= {}; x:= n;   do     x:= convert(convert(x^2, base, 10), `+`);     if member(x, L) then return nops(L)  fi;     L:= L union {x};   od: end proc: seq(A(n), n=0..200); # Robert Israel, May 30 2014 PROG (PARI) a(n)=my(v=List()); while(1, n=sumdigits(n^2); for(i=1, #v, if(n==v[i], return(#v))); listput(v, n)) \\ Charles R Greathouse IV, May 30 2014 CROSSREFS Cf. A007953, A004159, A061904-A061910. Sequence in context: A067277 A177951 A222130 * A084118 A046071 A078147 Adjacent sequences:  A061900 A061901 A061902 * A061904 A061905 A061906 KEYWORD nonn,base,easy AUTHOR Asher Auel (asher.auel(AT)reed.edu), May 17 2001 EXTENSIONS Corrected a(0) and example, Robert Israel, May 30 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 24 11:49 EDT 2019. Contains 321448 sequences. (Running on oeis4.)