OFFSET
0,1
COMMENTS
It is conjectured that an integer is always reached.
Also number of steps for iteration of map x -> (4/3)*floor(x) to reach an integer when started at 3n+4.
LINKS
FORMULA
a(3n+1)=2.
MAPLE
b:= proc(n) local i; n; for i do 4/3*ceil(%);
if %::integer then return i fi od
end:
a:= n-> b(3*n+1):
seq(a(n), n=0..100); # Alois P. Heinz, Mar 01 2021
PROG
(PARI) a(n)=if(n<0, 0, c=(3*n+1)*4/3; x=1; while(frac(c)>0, c=4/3*ceil(c); x++); x)
(PARI) a(n)=if(n<0, 0, c=(3*n+4)*4/3; x=1; while(frac(c)>0, c=4/3*floor(c); x++); x)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Sep 28 2003
STATUS
approved