OFFSET
1,1
COMMENTS
Numbers k such that iteration of the map x -> (5/3)*floor(x) starting at x = k takes more steps to reach an integer > k than it does for any number from 2 to k - 1.
MAPLE
g:= x -> 5/3 * floor(x):
h:= proc(n) local i, k;
k:= g(n);
for i from 1 while not (k::integer and k > n) do k:= g(k) od:
i
end proc:
M:= 2: A:= 2: count:= 1:
for n from 3 while count < 17 do
v:= h(n);
if v > M then count:= count+1; A:= A, n; M:= v fi;
od:
A;
MATHEMATICA
g = 5/3 * Floor[#]&;
h[n_] := Module[{i, k}, k = g[n]; For[i = 1, !IntegerQ[k] && k > n, i++, k = g[k]]; i];
M = 2; A = {2}; count = 1;
For[n = 3, count < 17, n++, v = h[n]; If[v > M, count++; A = Append[A, n]; Print[A]; M = v]];
A (* Jean-François Alcover, Sep 14 2023, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 01 2023
EXTENSIONS
a(18)-a(21) from Chai Wah Wu, Sep 02 2023
a(22)-a(28) from Martin Ehrenstein, Sep 03 2023
STATUS
approved