OFFSET
1,2
COMMENTS
It is conjectured that L_n always reaches a cycle.
From Robert Israel, Dec 25 2017: (Start)
a(10^k-1) = 1 for k >= 1.
a(19*10^k-1) = 2.
Empirical:
a(10^k) = k+1 for all k.
a(2*10^k) = 9*k+15 for k >= 1.
a(2*10^k-1) = 1 for k >= 1.
a(10^k+1) = k for k >= 1.
a(2*10^k+1) = 3*k+3 for k >= 1. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
L_2 = [1,3,5,7,9,11,13,33,35,55,57,77,79,99,101,13,...] enters a cycle of length 9 after 6 steps.
MAPLE
f:= proc(n) local t, k, S, d;
t:= 1; S[t]:= 0;
for k from 1 do
d:= 10^ilog10(t);
t:= 10*(t mod d)+ floor(t/d) + n;
if assigned(S[t]) then return S[t] fi;
S[t]:= k;
od
end proc:
map(f, [$1..100]); # Robert Israel, Dec 25 2017
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 24 2006
EXTENSIONS
Corrected by Robert Israel, Dec 25 2017
STATUS
approved