login
Numbers n such that the elements of the Collatz trajectory of n are exactly the same as the divisors of n.
1

%I #14 May 22 2016 09:33:39

%S 1,2,4,8,16,32,64,80,128,256,512,1024,2048,4096,8192,16384,32768,

%T 65536,131072,262144,524288,1048576,2097152,4194304,8388608,16777216,

%U 33554432,67108864,134217728,268435456,536870912,1073741824,2147483648,4294967296,8589934592

%N Numbers n such that the elements of the Collatz trajectory of n are exactly the same as the divisors of n.

%C The number 80 is probably the unique non-power of 2 in the sequence.

%e 80 is in the sequence because 80 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 with 9 iterations and the divisors of 80 are 1, 2, 4, 5, 8, 10, 16, 20, 40, 80.

%p with(numtheory):nn:=10000:

%p for n from 1 to nn do:

%p m:=n:it:=0:lst:={n}:

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

%p if irem(m,2)=0

%p then

%p m:=m/2:

%p else

%p m:=3*m+1:

%p fi:

%p it:=it+1:lst:=lst union {m}:

%p od:

%p x:=divisors(n):n0:=nops(x):lst1:={op(x),x[n0]}:

%p lst2:=lst intersect lst1:n1:=nops(lst2):

%p if it+1=n1 and n0=n1

%p then

%p print(n):

%p else fi:

%p od:

%Y Cf. A000079, A006577.

%K nonn

%O 1,2

%A _Michel Lagneau_, May 12 2016