login
Positions of records in A087704.
6

%I #26 Sep 15 2023 01:54:14

%S 2,5,10,82,284,680,1322,68104,149795,213895,1023127,3775307,25396927,

%T 36254395,53343289,68677522,266888359,366901277,558829814,1576699732,

%U 8527370677,11616255230,16948492520,167299409017,222801579737,2001199132825,5024272986979,7880897129684

%N Positions of records in A087704.

%C 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.

%F A087704(a(n)) = A365343(n).

%e a(3) = 10 is a term because A087704(10) = 9 and A087704(k) < 9 for 2 <= k < 10.

%p g:= x -> 5/3 * floor(x):

%p h:= proc(n) local i,k;

%p k:= g(n);

%p for i from 1 while not (k::integer and k > n) do k:= g(k) od:

%p i

%p end proc:

%p M:= 2: A:= 2: count:= 1:

%p for n from 3 while count < 17 do

%p v:= h(n);

%p if v > M then count:= count+1; A:= A,n; M:= v fi;

%p od:

%p A;

%t g = 5/3 * Floor[#]&;

%t h[n_] := Module[{i, k}, k = g[n]; For[i = 1, !IntegerQ[k] && k > n, i++, k = g[k]]; i];

%t M = 2; A = {2}; count = 1;

%t For[n = 3, count < 17, n++, v = h[n]; If[v > M, count++; A = Append[A, n]; Print[A]; M = v]];

%t A (* _Jean-François Alcover_, Sep 14 2023, after _Robert Israel_ *)

%Y Cf. A087704, A365343.

%K nonn

%O 1,1

%A _Robert Israel_, Sep 01 2023

%E a(18)-a(21) from _Chai Wah Wu_, Sep 02 2023

%E a(22)-a(28) from _Martin Ehrenstein_, Sep 03 2023