login
Numbers n such that the concave polygon formed by the trajectory of n in the "3n+1" problem and the straight line between the coordinate points (0,n) and (r,1) where r is the number of iterations needed to reach 1 is not a self-intersecting polygon.
2

%I #12 Nov 16 2024 20:19:18

%S 3,4,5,7,8,11,16,27,31,32,40,47,48,63,64,71,80,88,96,104,112,116,128,

%T 136,144,148,152,160,168,176,180,192,196,200,208,212,224,232,256,260,

%U 264,272,276,280,288,296,304,308,320,336,344,352,360,368,372,384

%N Numbers n such that the concave polygon formed by the trajectory of n in the "3n+1" problem and the straight line between the coordinate points (0,n) and (r,1) where r is the number of iterations needed to reach 1 is not a self-intersecting polygon.

%C The finite sequence A265687 is included in this sequence and considers only the polygons located above the line connecting (0,n) and (r,1). This sequence considers all polygons located either above or below the line connecting (0,n) and (r,1).

%C Consider the 3n+1 function iterates (n, T(n), T(T(n)),...,4,2,1) plotted on standard vertical and horizontal scales. Each coordinate point (0,n), (1,T(n)), (2, T(T(n))),...,(r,1), where r is the number of iterations needed to reach 1, is connected to the next by a straight line, and the two points (0,n) and (r,1) are also connected by a straight line in order to form a polygon. The sequence lists the numbers n such that all the points of the polygon are located either above the line connecting (0,n) and (r,1) or below this line.

%C Properties of the sequence:

%C The powers of 2 (A000079) are in the sequence, except the numbers 1 and 2.

%C The odd values of the sequence are 3, 5, 7, 11, 27, 31, 47, 63 and 71.

%H Michel Lagneau, <a href="/A266796/a266796.pdf">Examples</a>

%e see the link.

%p T:=array(1..2000):U:=array(1..2000):nn:=100:

%p for n from 2 to nn do:

%p kk:=1:m:=n:T[kk]:=n:it:=0:

%p for i from 1 to nn while(m<>1) do:

%p if irem(m,2)=0

%p then

%p m:=m/2:kk:=kk+1:T[kk]:=m:it:=it+1:

%p else

%p m:=3*m+1:kk:=kk+1:T[kk]:=m:it:=it+1:

%p fi:

%p od:

%p for j from 1 to it do:

%p z:=((1-n)/it)*(j-1)+n:

%p if z<T[j] then U[j]:=1

%p else

%p U[j]:=-1

%p fi:

%p od:

%p jj:=0:

%p for k from 2 to it-1 do:

%p if U[k]+U[k+1]=0 then jj:=jj+1:

%p else fi:

%p od:

%p if jj=0

%p then

%p printf(`%d, `,n):

%p else fi:

%p od:

%Y Cf. A006577, A265687.

%K nonn

%O 1,1

%A _Michel Lagneau_, Jan 03 2016