login
Number of steps for iteration of map x -> (4/3)*ceiling(x) to reach an integer > 3n+1 when started at 3n+1, or -1 if no such integer is ever reached.
1

%I #10 Mar 01 2021 19:02:57

%S 3,2,8,7,2,3,5,2,6,3,2,5,4,2,3,4,2,4,3,2,4,9,2,3,5,2,6,3,2,5,5,2,3,6,

%T 2,5,3,2,7,4,2,3,4,2,4,3,2,4,5,2,3,6,2,5,3,2,8,8,2,3,7,2,7,3,2,6,4,2,

%U 3,4,2,4,3,2,4,7,2,3,8,2,8,3,2,6,6,2,3,5,2,8,3,2,5,4,2,3,4,2,4,3,2,4,6,2,3

%N Number of steps for iteration of map x -> (4/3)*ceiling(x) to reach an integer > 3n+1 when started at 3n+1, or -1 if no such integer is ever reached.

%C It is conjectured that an integer is always reached.

%C Also number of steps for iteration of map x -> (4/3)*floor(x) to reach an integer when started at 3n+4.

%H J. C. Lagarias and N. J. A. Sloane, Approximate squaring (<a href="http://neilsloane.com/doc/apsq.pdf">pdf</a>, <a href="http://neilsloane.com/doc/apsq.ps">ps</a>), Experimental Math., 13 (2004), 113-128.

%F a(3n+1)=2.

%p b:= proc(n) local i; n; for i do 4/3*ceil(%);

%p if %::integer then return i fi od

%p end:

%p a:= n-> b(3*n+1):

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Mar 01 2021

%o (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)

%o (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)

%Y Equals A085068(3n+1).

%K nonn,easy

%O 0,1

%A _Benoit Cloitre_, Sep 28 2003