A183110 Period-length of the ultimate periodic behavior of the orbit of a list [1,1,1,...,1] of n 1's under the mapping defined in the comments.
1, 2, 1, 3, 3, 1, 4, 4, 4, 1, 5, 5, 5, 5, 1, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 1, 8, 8, 8, 8, 8, 8, 8, 1, 9, 9, 9, 9, 9, 9, 9, 9, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 1, 13, 13
Offset: 1
Examples
Under the indicated mapping the list [1,1,1,1,1,1,1] of seven 1's results in the orbit [1,1,1,1,1,1,1], [2,1,1,1,1,1], [2,2,1,1,1], [3,2,1,1], [3,2,2], [3,3,1], [4,2,1], [3,2,1,1], ... which is clearly periodic with period-length 4, so a(7) = 4.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
f[p_] := Module[{pp, x, lpp, m, i}, pp = p; x = pp[[1]]; pp = Delete[pp,1]; lpp = Length[pp]; m = Min[x, lpp]; For[i = 1, i ≤ m, i++, pp[[i]]++]; For[i = 1, i ≤ x - lpp, i++, AppendTo[pp, 1]]; pp]; orb[p_] := Module[{s, v}, v = p; s = {v}; While[! MemberQ[s, v = f[v]], AppendTo[s, v]]; s]; attractor[p_] := Module[{orbp, pos, len, per}, orbp = orb[p]; pos = Flatten[Position[orbp, f[orbp[[-1]]]]][[1]] - 1; (*pos = steps to enter period*) len = Length[orbp] - pos; per = Take[orbp, -len]; Sort[per]]; a = {}; For[n = 1, n ≤ 80, n++, {rn = Table[1, {k, 1, n}]; orbn = orb[rn]; lenorb = Length[orbn]; lenattr = Length[attractor[rn]]; AppendTo[a, lenattr]}]; Print[a];
Formula
It appears, but has not yet been proved, that a(n)=1 if n=t(k) and a(n)=k if t(k-1) < n < t(k) where t(k) is the k-th triangular number t(k) = k*(k+1)/2.
Comments