login
A368878
a(n) is the least k such that A368877^k(n) < n or -1 if no such k exists.
2
2, 1, 1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 2, 8, 1, 2, 1, 1, 1, 1, 1, 2, 1, 8, 1, 2, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 7, 7, 1, 2, 1, 2, 2, 2, 8, 8, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 7, 7, 1, 1, 1, 1, 1, 1, 1, 6, 1
OFFSET
3,1
COMMENTS
This is the falling time function ft in the paper of Eliahou et al.
The offset is 3 because A368877(1) = A368877(2) = 2, so for n<3 is not defined.
LINKS
Shalom Eliahou, Jean Fromentin, and Rénald Simonetto, Is the Syracuse falling time bounded by 12?, hal-03294829, 2021.
MATHEMATICA
A368877[n_] := Nest[If[OddQ[#], (3*#+1)/2, #/2] &, n, BitLength[n]];
A368878[n_] := Length[NestWhileList[A368877, n, #>=n&]]-1;
Array[A368878, 120, 3] (* Paolo Xausa, Jan 08 2024 *)
PROG
(PARI) T(n) = if (n%2, (3*n+1)/2, n/2); \\ A014682
jp(n) = my(N=1+logint(n, 2)); for (i=1, N, n = T(n)); n; \\ A368877
a(n) = my(k=1, m=n); while ((m=jp(m)) >= n, k++); k;
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Jan 08 2024
STATUS
approved