The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A078786 Period of cycle of the inventory sequence (as in A063850) starting with n. 1
 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 4, 2, 1, 2, 1, 1, 4, 4, 4, 4, 3, 1, 1, 1, 1, 1, 4, 3, 3, 3, 2, 1, 1, 1, 4, 4, 1, 3, 2, 2, 2, 1, 1, 1, 4, 3, 3, 1, 2, 2, 2, 1, 1, 1, 4, 3, 2, 2, 1, 2, 2, 1, 1, 1, 4, 3, 2, 2, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS It can be proved that any inventory sequence ends in a cycle all of whose terms are <= 10^20. Conjecture: a(n) <= 4 for all n. It suffices to check this for all inventory sequences starting with n, where n <= 10^20. LINKS Carlos Rivera, The Inventory Sequences and Self-Inventoried Numbers EXAMPLE The inventory sequence starting with 1 is: 1, 11, 21, 1211, 3112, 132112, 311322, 232122, 421311, 14123113, 41141223, 24312213, 32142321, 23322114, 32232114, 23322114, .... which ends in the cycle 32232114, 23322114 of period 2. Hence a(1) = 2. MATHEMATICA g[n_] := Module[{seen, r, d, l, i, t}, seen = {}; r = {}; d = IntegerDigits[n]; l = Length[d]; For[i = 1, i <= l, i++, t = d[[i]]; If[ ! MemberQ[seen, t], r = Join[r, IntegerDigits[Count[d, t]]]; r = Join[r, {t}]; seen = Append[seen, t]]]; FromDigits[r]]; per[n_] := Module[{r, t, p1, p}, r = {}; t = g[n]; While[ ! MemberQ[r, t], r = Append[r, t]; t = g[t]]; r = Append[r, t]; p1 = Flatten[Position[r, t]]; p = p1[[2]] - p1[[1]]; p]; Table[per[i], {i, 1, 100}] CROSSREFS Cf. A063850, A078970. Sequence in context: A279185 A161385 A152907 * A102677 A145884 A030368 Adjacent sequences:  A078783 A078784 A078785 * A078787 A078788 A078789 KEYWORD base,nice,nonn AUTHOR Joseph L. Pe, Jan 14 2003 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 July 29 03:57 EDT 2021. Contains 346340 sequences. (Running on oeis4.)