This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A211981 #18 Oct 26 2024 22:59:29 %S A211981 1,2,3,4,5,8,10,16,21,32,42,64,75,85,113,128,151,170,227,256,341,512, %T A211981 682,1024,1365,2048,2730,4096,5461,7281,8192,10922,14563,16384,21845, %U A211981 32768,43690,65536,87381,131072,174762,262144,349525,466033,524288,699050,932067 %N A211981 Numbers n such that floor(2^A006666(n)/3^A006667(n)) = n. %C A211981 A006666 and A006667 give the number of halving and tripling steps to reach 1 in 3x+1 problem. %C A211981 Properties of this sequence: %C A211981 A006667(a(n)) <= 3, and if a(n) is even then a(n)/2 is in the sequence. %C A211981 The sequence A000079(n) (power of 2) is included in this sequence. %C A211981 {a(n)} = E1 union E2 where E1 = {A000079(n)} union {5, 10, 21, 85, 170, 227, 341, 682, 1365, 2730, 5461, ...} and E2 = {75, 113, 151, 7281, ...}. If an element k of E1 generates the Collatz sequence of iterates k -> T_1(k) -> T_2(k) -> T_3(k) -> ... then any T_i(k) is an element of E1 of the form [2^a /3^b] where a = A006666(n), or A006666(n)-1, or ... and b = A006667(n), or A006667(n)-1, or ... But if k is an element of E2, there exists at least an element T_i(k) that is not in the sequence a(n). For example 75 -> 226 ->113 -> 340 -> ... and 226 is not in the sequence because, if [x] = [2^a /3^b] = [ x. x0 x1 x2 ...], the rational number 0.x0 x1 x2 ... > 0.666666.... => [2^a /3^(b-1)] of the form [(3x+2).y0 y1 y2 ...], and this integer is different from T_(i+1)(k) = [(3x+1).y0 y1 y2 ...] = 3x+1. %C A211981 Example: T_2(75) = floor(2^10 /3^2) = 113 => floor(2^10/3^1) = 341 instead T_3(75) = 340. %e A211981 227 is in the sequence because A006666(227) = 11, A006667(227) = 2 => floor(2^11/3^2) = 227. %e A211981 The Collatz trajectory of 227 is 227 -> 682 -> 341 -> 1024 -> 512 -> ... -> 2 -> 1, and 227 is in the subset E1 implies the following Collatz iterates: %e A211981 227 = floor(2^11/3^2); %e A211981 682 = floor(2^11/3^1); %e A211981 341 = floor(2^10/3^1); %e A211981 1024 = floor(2^10/3^0); %e A211981 512 = floor(2^9/3^0); %e A211981 256 = floor(2^8/3^0); %e A211981 128 = floor(2^7/3^0); %e A211981 ... %e A211981 2 = floor(2^1/3^0); %e A211981 1 = floor(2^0/3^0); %e A211981 With the numbers of E1, we obtain another formulation of the Collatz problem. %p A211981 A:= proc(n) if type(n, 'even') then n/2; else 3*n+1 ; end if; end proc: %p A211981 B:= proc(n) a := 0 ; x := n ; while x > 1 do x := A(x) ; a := a+1 ; end do; a ; end proc: %p A211981 C:= proc(n) a := 0 ; x := n ; while x > 1 do if type(x, 'even') then x := x/2 ; else x := 3*x+1 ; a := a+1 ; end if; end do; a ; end proc: %p A211981 D:= proc(n) C(n) ; end proc: %p A211981 A006666:= proc(n) B(n)- C(n) ; end: %p A211981 A006667:= proc(n) C(n)- D(n) ; end: %p A211981 G:= proc(n) floor(2^ A006666 (n)/3^ A006667 (n)) ; end: %p A211981 for i from 1 to 1000000 do: if G(i) =i then printf(`%d, `,i):else fi:od: %t A211981 Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 30; t = {}; n = 0; While[Length[t] < nn, n++; c = Collatz[n]; ev = Length[Select[c, EvenQ]]; od = Length[c] - ev - 1; If[Floor[2^ev/3^od] == n, AppendTo[t, n]]]; t (* _T. D. Noe_, Feb 13 2013 *) %Y A211981 Cf. A006666, A006667. %K A211981 nonn %O A211981 1,2 %A A211981 _Michel Lagneau_, Feb 13 2013